message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix DRBG test vector download link | #include "testlib/s2n_testlib.h"
-/* Test vectors are taken from http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
+/* Test vectors are taken from https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/drbg/drbgtestvectors.zip
* - drbgvectors_pr_true/CTR_DRBG.txt :
* [AES-128 no df]
* [PredictionResistance = True]
@@ -144,7 +144,7 @@ const char nist_aes128_reference_returned_bits_hex[] =
"7c41adf941656cfb9f24409d6cc4d578d43930b3e23ec801a59c53d999401bc0cb3e5b8797b2770a8a8f51ff594b7b17d9e694d5e36644508d16cb2554057adc"
"ac054570b081cf53b39b0a2faa21ee9b554c05ff9055843ac0eb9031d1de324701ad4cf2875623e0bf4184de4aea20070be1cb586880ac87fbb7e414b4b128d0";
-/* Test vectors are taken from http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
+/* Test vectors are taken from https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/drbg/drbgtestvectors.zip
* - drbgvectors_pr_true/CTR_DRBG.txt :
* [AES-256 no df]
* [PredictionResistance = True]
@@ -255,7 +255,7 @@ const char nist_aes256_reference_returned_bits_hex[] =
"6553c630a07ddf7dc2110c3aa3c5ac0c488a0345e07571cd71df115ba37ea4676935be72a6033aeca7ac6fcce5654dae38f5777b5cff34b156539b42ed6dc93c"
"ed703d9273bb9462ac400ee8d587ea3c4d6c27aa014defcb6ca6fe885272bcb4b6ba0822f42941071bf635b41d997c631b680d91b23ee48351041dc274900821";
-/* Test vectors are taken from http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
+/* Test vectors are taken from https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/drbg/drbgtestvectors.zip
* - drbgvectors_no_reseed/CTR_DRBG.txt :
* [AES-256 no df]
* [PredictionResistance = False]
|
Increase the maximum TCS value | @@ -26,7 +26,7 @@ typedef struct _oe_sgx_enclave_image_info_t
} oe_sgx_enclave_image_info_t;
/* Max number of threads in an enclave supported */
-#define OE_SGX_MAX_TCS 32
+#define OE_SGX_MAX_TCS 1024
// oe_sgx_enclave_properties_t SGX enclave properties derived type
#define OE_SGX_FLAGS_DEBUG 0x0000000000000002ULL
|
DSP: Fix issue gnu compiler specific diagnostics in arm_math.h | #ifndef _ARM_MATH_H
#define _ARM_MATH_H
-/* ignore some GCC warnings */
-#if defined ( __GNUC__ )
+/* Compiler specific diagnostic adjustment */
+#if defined ( __CC_ARM )
+
+#elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
+
+#elif defined ( __GNUC__ )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wunused-parameter"
+
+#elif defined ( __ICCARM__ )
+
+#elif defined ( __TI_ARM__ )
+
+#elif defined ( __CSMC__ )
+
+#elif defined ( __TASKING__ )
+
+#else
+ #error Unknown compiler
#endif
+
#define __CMSIS_GENERIC /* disable NVIC and Systick functions */
#if defined(ARM_MATH_CM7)
@@ -7213,9 +7229,24 @@ void arm_rfft_fast_f32(
}
#endif
+/* Compiler specific diagnostic adjustment */
+#if defined ( __CC_ARM )
-#if defined ( __GNUC__ )
+#elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
+
+#elif defined ( __GNUC__ )
#pragma GCC diagnostic pop
+
+#elif defined ( __ICCARM__ )
+
+#elif defined ( __TI_ARM__ )
+
+#elif defined ( __CSMC__ )
+
+#elif defined ( __TASKING__ )
+
+#else
+ #error Unknown compiler
#endif
#endif /* _ARM_MATH_H */
|
zephyr/shim/include/zephyr_adc.h: Format with clang-format
BRANCH=none
TEST=none | @@ -38,9 +38,7 @@ extern struct adc_t adc_channels[];
#endif /* CONFIG_ADC_CHANNELS_RUNTIME_CONFIG */
#else
/* Empty declaration to avoid warnings if adc.h is included */
-enum adc_channel {
- ADC_CH_COUNT
-};
+enum adc_channel { ADC_CH_COUNT };
#endif /* CONFIG_PLATFORM_EC_ADC */
#endif /* __CROS_EC_ZEPHYR_ADC_H */
|
Remove inline functions which prevent compile | @@ -402,14 +402,6 @@ static inline uint8_t lv_color_brightness(lv_color_t color)
(uint8_t) ((uint32_t)(c & 0xF0) | ((c & 0xF0) >> 4)), \
(uint8_t) ((uint32_t)(c & 0xF) | ((c & 0xF) << 4)))
-static inline lv_color_t lv_color_hex(uint32_t c){
- return LV_COLOR_HEX(c);
-}
-
-static inline lv_color_t lv_color_hex3(uint32_t c){
- return LV_COLOR_HEX3(c);
-}
-
/**
* Convert a HSV color to RGB
|
wireless/bluetooth/btsak: Correct format of help for GATT commands. | @@ -688,7 +688,7 @@ void btsak_gatt_showusage(FAR const char *progname, FAR const char *cmd,
FAR const struct btsak_command_s *gattcmd = &g_btsak_gatt_commands[i];
if (gattcmd->help != NULL)
{
- fprintf(stderr, "\t%-10gdbs\t%s\n", gattcmd->name, gattcmd->help);
+ fprintf(stderr, "\t%-10s\t%s\n", gattcmd->name, gattcmd->help);
}
else
{
|
runtime - avoid potential memory errors | @@ -40,7 +40,6 @@ void __noinline __net_recurrent(void)
{
shmptr_t shm;
struct mbuf *m;
- struct rx_net_hdr *rxhdr;
struct kthread *k = myk();
assert_preempt_disabled();
@@ -57,6 +56,7 @@ void __noinline __net_recurrent(void)
return;
}
+#if 0
/* drain RX completions */
while (!mbufq_empty(&k->txcmdq_overflow)) {
m = mbufq_peak_head(&k->txcmdq_overflow);
@@ -70,6 +70,7 @@ void __noinline __net_recurrent(void)
if (unlikely(preempt_needed()))
return;
}
+#endif
}
@@ -120,13 +121,16 @@ static struct mbuf *net_rx_alloc_mbuf(struct rx_net_hdr *hdr)
/* copy the payload and release the buffer back to the iokernel */
memcpy(buf, hdr->payload, hdr->len);
- net_rx_send_completion(hdr->completion_data);
mbuf_init(m, buf, hdr->len, 0);
m->len = hdr->len;
m->csum_type = hdr->csum_type;
m->csum = hdr->csum;
m->rss_hash = hdr->rss_hash;
+
+ barrier();
+ net_rx_send_completion(hdr->completion_data);
+
m->release_data = 0;
m->release = net_rx_release_mbuf;
return m;
@@ -180,18 +184,8 @@ static struct mbuf *net_rx_one(struct rx_net_hdr *hdr)
uint16_t len;
m = net_rx_alloc_mbuf(hdr);
- if (unlikely(!m)) {
- struct kthread *k = getk();
-
- while (!lrpc_send(&k->txcmdq, TXCMD_NET_COMPLETE,
- hdr->completion_data)) {
- putk();
- cpu_relax();
- k = getk();
- }
- putk();
+ if (unlikely(!m))
return NULL;
- }
STAT(RX_PACKETS)++;
STAT(RX_BYTES) += mbuf_length(m);
|
imu: remove unused functions | #define ACC_MIN 0.7f
#define ACC_MAX 1.3f
-#define _sinf(val) sinf(val)
-#define _cosf(val) cosf(val)
-
-void vectorcopy(float *vector1, float *vector2) {
- for (int axis = 0; axis < 3; axis++) {
- vector1[axis] = vector2[axis];
- }
-}
-
#ifdef QUICKSILVER_IMU
static filter_lp_pt1 filter;
static filter_state_t filter_pass1[3];
|
probably better to have window set at 0xF000 by default | #include "font.h"
-#define WINDOW_DEFAULT 0xD000 // multiple of 0x1000 (0x0800 in H32)
+#define WINDOW_DEFAULT 0xF000 // multiple of 0x1000 (0x0800 in H32)
#define HSCRL_DEFAULT 0xD800 // multiple of 0x0400
#define SLIST_DEFAULT 0xDC00 // multiple of 0x0400 (0x0200 in H32)
#define APLAN_DEFAULT 0xE000 // multiple of 0x2000
@@ -89,7 +89,7 @@ void VDP_init()
regValues[0x00] = 0x04;
regValues[0x01] = 0x74; /* reg. 1 - Enable display, VBL, DMA + VCell size */
regValues[0x02] = aplan_addr / 0x400; /* reg. 2 - Plane A = $E000 */
- regValues[0x03] = window_addr / 0x400; /* reg. 3 - Window = $D000 */
+ regValues[0x03] = window_addr / 0x400; /* reg. 3 - Window = $F000 */
regValues[0x04] = bplan_addr / 0x2000; /* reg. 4 - Plane B = $C000 */
regValues[0x05] = slist_addr / 0x200; /* reg. 5 - Sprite table = $DC00 */
regValues[0x06] = 0x00; /* reg. 6 - not used */
|
Refactor where generate blurred image before resample | @@ -11996,6 +11996,39 @@ Image_rendering_intent_eq(VALUE self, VALUE ri)
}
+#if defined(IMAGEMAGICK_7)
+/**
+ * Create new blurred image.
+ *
+ * No Ruby usage (internal function)
+ *
+ * @param image the image
+ * @param blur the blur
+ * @return NULL if not apply blur, otherwise a new image
+ */
+static Image*
+blurred_image(Image* image, double blur)
+{
+ ExceptionInfo *exception;
+ Image *new_image;
+
+ exception = AcquireExceptionInfo();
+ if (blur > 1.0)
+ {
+ new_image = BlurImage(image, blur, blur, exception);
+ }
+ else
+ {
+ new_image = SharpenImage(image, blur, blur, exception);
+ }
+ rm_check_exception(exception, new_image, DestroyOnError);
+ DestroyExceptionInfo(exception);
+
+ return new_image;
+}
+#endif
+
+
/**
* Resample image to specified horizontal resolution, vertical resolution,
* filter and blur factor.
@@ -12078,20 +12111,9 @@ resample(int bang, int argc, VALUE *argv, VALUE self)
exception = AcquireExceptionInfo();
#if defined(IMAGEMAGICK_7)
- Image *preprocess = NULL;
- if (blur > 1.0)
- {
- preprocess = BlurImage(image, blur, blur, exception);
- }
- else if (blur < 1.0)
- {
- preprocess = SharpenImage(image, blur, blur, exception);
- }
- new_image = ResampleImage((preprocess ? preprocess : image), x_resolution, y_resolution, filter, exception);
- if (preprocess != NULL)
- {
+ Image *preprocess = blurred_image(image, blur);
+ new_image = ResampleImage(preprocess, x_resolution, y_resolution, filter, exception);
DestroyImage(preprocess);
- }
#else
new_image = ResampleImage(image, x_resolution, y_resolution, filter, blur, exception);
#endif
|
ames: in |close-flows fix bug matching subs wire | ?~ duct ~
:: inspect the wires in the duct, looking for subscriptions
::
-?. ?=([%gall %use sub=@ @ %out @ @ nonce=@ pub=@ ~] i.duct)
+?. ?=([%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] i.duct)
$(duct t.duct)
:: extra security check so we know that the nonce is a number
::
|
web-ui: allow setting visibility when creating keys | @@ -43,10 +43,10 @@ export default class AddDialog extends Component {
}
handleClose = () => {
- const { onClose } = this.props
+ const { onClose, instanceVisibility } = this.props
this.setState({
name: '', value: '', type: 'any',
- visibility: props.instanceVisibility || 'user',
+ visibility: instanceVisibility || 'user',
error: false,
})
onClose()
@@ -55,7 +55,7 @@ export default class AddDialog extends Component {
handleCreate = () => {
const { item, onAdd, setMetaByPath } = this.props
const { path } = item
- const { name, value, type } = this.state
+ const { name, value, type, visibility } = this.state
onAdd(path, name, value)
if (type !== 'any') {
setMetaByPath(path + '/' + name, 'check/type', type)
|
docs(setup): remove extra slash from Fedora toolchain install command | @@ -318,7 +318,7 @@ To build firmwares for the ARM architecture (all supported MCUs/keyboards at thi
export ZSDK_VERSION=0.11.4
wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZSDK_VERSION}/zephyr-toolchain-arm-${ZSDK_VERSION}-setup.run" && \
sh "zephyr-toolchain-arm-${ZSDK_VERSION}-setup.run" --quiet -- -d ~/.local/zephyr-sdk-${ZSDK_VERSION} && \
- rm "zephyr-toolchain-arm-\${ZSDK_VERSION}-setup.run"
+ rm "zephyr-toolchain-arm-${ZSDK_VERSION}-setup.run"
```
The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults should normally work as expected.
|
arch/xtensa: Remove non-existent ARCH_HAVE_TESTSET support for ESP32-S2 | @@ -54,7 +54,6 @@ config ARCH_CHIP_ESP32S2
select ARCH_HAVE_SDRAM
select ARCH_HAVE_RESET
select ARCH_HAVE_BOOTLOADER
- select ARCH_HAVE_TESTSET
select ARCH_VECNOTIRQ
select LIBC_ARCH_ATOMIC
select LIBC_ARCH_MEMCPY
|
more cleanup in RELEASE.md | @@ -59,8 +59,8 @@ we need to.
## Workflows
-We use GitHub Workflows and Actions to automate CI/CD tasks for the AppScope
-code when changes are made in the project's repository. The
+We use GitHub Workflows and Actions to automate CI/CD tasks for the project
+when changes are made in the repository. The
[`build`](../.github/workflows/build.yml) workflow builds the code and runs the
unit tests with every push, on every branch. When the tests pass, some
additional steps are taken depending on the trigger.
@@ -71,24 +71,25 @@ additional steps are taken depending on the trigger.
* We build [container images](#container-images) and push them to Docker Hub
for release tags.
-> TODO: build/tag `:next` images from the default branch too
+> TODO: add `:next` images from the default branch too
-* Our [integration tests](../test/testContainers/) are not currently run in
- CI/CD but there is an effort underway to change this. The plan is to run them
- for release tags and for pushes to the default and release branchs. We also
- want to run them for PRs to the default branch.
+* We run out [integration tests](../test/testContainers/) for release tags and
+ for pushes and pull-requests to the default and release branches.
+
+> TODO: we're not actually doing this yet.
The [`website`](../.github/workflows/website.yml) workflow handles building and
deploying the [`website/`](../website/) content to <https://appscope.dev/> from
-tjhe default branch and <https://staging.appscope.dev/> from `staging`.
+the default branch and <https://staging.appscope.dev/> from `staging`. See the
+build script in that folder for details.
## CDN
-After the [workflow](#workflows) successfully builds and unit-tests the
-code, the `scope` binary and other artifacts of the build are pushed to an S3
+We push the built and tested `scope` binary and a TGZ package to an S3
container at AWS which is exposed at `https://cdn.cribl.io/dl/scope/`. Below
that base URL we have:
+
* `latest` - text file with the latest release number in it; i.e. `0.6.1`
* `$VERSION/linux/scope`
* `$VERSION/linux/scope.md5`
@@ -131,4 +132,7 @@ We currently build these for release tags (i.e. `v*`) and tag the images to
match with the leading `v` striped off. If the git tag doesn't match `*-rc*`
then we also apply the `:latest` tag to the images.
-> BUG: a maintenance release for an older
+> TODO: Looking for details on what downstream uses these containers.
+
+> BUG: a maintenance release for an old major/minor release will step on the
+> `:latest` tag as the script works now.
|
Inproving huristic to handle cases where there is lots of valid data coming in that is starving out the time trace ops. | @@ -289,7 +289,6 @@ static bool EnableTrace(stlink_t* stlink, const st_settings_t* settings, uint32_
DBGMCU_CR_DBG_STANDBY | DBGMCU_CR_TRACE_IOEN |
DBGMCU_CR_TRACE_MODE_ASYNC); // Enable async tracing
- DLOG("Setting trace frequency to %d Hz.\n", trace_frequency);
if (stlink_trace_enable(stlink, trace_frequency)) {
ELOG("Unable to turn on tracing in stlink\n");
if (!settings->force)
@@ -330,6 +329,7 @@ static bool EnableTrace(stlink_t* stlink, const st_settings_t* settings, uint32_
WLOG("line option or set it in your device's clock initialization routine, such as with:\n");
WLOG(" TPI->ACPR = HAL_RCC_GetHCLKFreq() / %d - 1;\n", trace_frequency);
}
+ ILOG("Trace frequency set to %d Hz.\n", trace_frequency);
return true;
}
@@ -460,10 +460,11 @@ static void CheckForConfigurationError(stlink_t* stlink, st_trace_t* trace, uint
// Simple huristic to determine if we are configured poorly.
bool error_no_data = (trace->count_raw_bytes < 100);
- bool error_bad_data = (trace->count_error > 1 || trace->count_time_packets < 10 || trace->unknown_sources > 0);
+ bool error_low_data = (trace->count_time_packets < 10 && trace->count_target_data < 1000);
+ bool error_bad_data = (trace->count_error > 1 || trace->unknown_sources > 0);
bool error_dropped_data = (trace->count_sw_overflow > 0);
- if (!error_no_data && !error_bad_data && !error_dropped_data)
+ if (!error_no_data && !error_low_data && !error_bad_data && !error_dropped_data)
return;
WLOG("****\n");
@@ -473,7 +474,7 @@ static void CheckForConfigurationError(stlink_t* stlink, st_trace_t* trace, uint
WLOG("Try setting a slower trace frequency with the --trace=%d command line option.\n", trace_frequency / 2);
}
- if (error_no_data || error_bad_data) {
+ if (error_no_data || error_low_data || error_bad_data) {
uint32_t prescaler;
stlink_read_debug32(stlink, TPI_ACPR, &prescaler);
if (prescaler) {
|
Warn if `lv_obj_set_pos` is called on a screen object | @@ -726,6 +726,11 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
/*Convert x and y to absolute coordinates*/
lv_obj_t * par = obj->par;
+ if(par == NULL) {
+ LV_LOG_WARN("lv_obj_set_pos: not changing position of screen object");
+ return;
+ }
+
x = x + par->coords.x1;
y = y + par->coords.y1;
|
Fix neutrino parameter declaration in ccl_sample_angpow.cc; fixes | #define SZ_SH 0.05
#define NL 499
#define PS 0.1
-#define NREL 3.046
-#define NMAS 0
-#define MNU 0.0
+#define NEFF 3.046
void print_params(int l_limber,const char *fname_params,const char *prefix_out)
{
@@ -77,7 +75,13 @@ int main(int argc,char **argv)
ccl_configuration config=default_config;
config.transfer_function_method=ccl_boltzmann_class;
config.matter_power_spectrum_method=ccl_linear;
- ccl_parameters params = ccl_parameters_create(OC, OB, OK, NREL, NMAS, MNU, W0, WA, HH, NORMPS, NS,-1,-1,-1,-1,NULL,NULL, &status);
+
+ // Set neutrino masses
+ double* MNU;
+ double mnuval = 0.;
+ MNU = &mnuval;
+ ccl_mnu_convention MNUTYPE = ccl_mnu_sum;
+ ccl_parameters params = ccl_parameters_create(OC, OB, OK, NEFF, MNU, MNUTYPE, W0, WA, HH, NORMPS, NS,-1,-1,-1,-1,NULL,NULL, &status);
// Initialize cosmology object given cosmo params
ccl_cosmology *cosmo=ccl_cosmology_create(params,config);
|
Fix bundle allocation in go_mem() | @@ -229,13 +229,18 @@ int dill_prologue(sigjmp_buf **jb, void **ptr, size_t len, int bndl,
/* Return ECANCELED if shutting down. */
int rc = dill_canblock();
if(dill_slow(rc < 0)) {err = ECANCELED; goto error1;}
- /* If bundle is not supplied by the user create one. */
+ /* If bundle is not supplied by the user create one. If user supplied a
+ memory to use put the bundle at the beginning of the block. */
int new_bundle = bndl < 0;
if(new_bundle) {
- if(*ptr)
+ if(*ptr) {
bndl = bundle_mem(*ptr);
- else
+ *ptr = ((uint8_t*)*ptr) + BUNDLE_SIZE;
+ len -= BUNDLE_SIZE;
+ }
+ else {
bndl = bundle();
+ }
if(dill_slow(bndl < 0)) {err = errno; goto error1;}
}
struct dill_bundle *bundle = hquery(bndl, dill_bundle_type);
|
Update num msgs in test_table.py for timing telem | @@ -44,7 +44,7 @@ def test_table_count():
Test number of available messages to deserialize.
"""
- number_of_messages = 160
+ number_of_messages = 162
assert len(_SBP_TABLE) == number_of_messages
def test_table_unqiue_count():
|
evp_test: Skip testcase if r parameter is unsupported
The r parameter of the KBKDF is unsupported by 3.0 FIPS module. | @@ -2651,6 +2651,13 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
if (p != NULL)
*p++ = '\0';
+ if (strcmp(name, "r") == 0
+ && OSSL_PARAM_locate_const(defs, name) == NULL) {
+ TEST_info("skipping, setting 'r' is unsupported");
+ t->skip = 1;
+ goto end;
+ }
+
rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p,
p != NULL ? strlen(p) : 0, NULL);
*++kdata->p = OSSL_PARAM_construct_end();
@@ -2664,6 +2671,7 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
}
+ goto end;
}
if (p != NULL
&& (strcmp(name, "cipher") == 0
@@ -2671,6 +2679,7 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
&& is_cipher_disabled(p)) {
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
+ goto end;
}
if (p != NULL
&& (strcmp(name, "mac") == 0)
@@ -2678,6 +2687,7 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
}
+ end:
OPENSSL_free(name);
return 1;
}
|
Fixed off by one error for LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN | #define NO_BREAK_FOUND UINT32_MAX
#define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */
-#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3 /* Minimum number of characters of a word to put on a line after a break */
+#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 4 /* Minimum number of characters of a word to put on a line after a break */
/**********************
* TYPEDEFS
@@ -187,7 +187,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
if(cur_w > max_width) {
if( last_break != NO_BREAK_FOUND ) {
/* Continue searching for next breakable character to see if the next word will fit */
- uint32_t n_char_fit = n_char_since_last_break;
+ uint32_t n_char_fit = n_char_since_last_break - 1;
if( n_char_since_last_break <= LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN ) {
i = last_break;
}
|
completed ccl_data_free(ccl_data * data) to include all splines + accelerators in ccl_data | @@ -505,6 +505,8 @@ void ccl_data_free(ccl_data * data)
gsl_spline_free(data->achi);
if(data->logsigma!=NULL)
gsl_spline_free(data->logsigma);
+ if(data->dlnsigma_dlogm!=NULL)
+ gsl_spline_free(data->dlnsigma_dlogm);
if(data->p_lin!=NULL)
gsl_spline2d_free(data->p_lin);
if(data->p_nl!=NULL)
@@ -521,6 +523,10 @@ void ccl_data_free(ccl_data * data)
gsl_spline_free(data->etahmf);
if(data->accelerator_d!=NULL)
gsl_interp_accel_free(data->accelerator_d);
+ if(data->accelerator_m!=NULL)
+ gsl_interp_accel_free(data->accelerator_m);
+ if(data->accelerator_k!=NULL)
+ gsl_interp_accel_free(data->accelerator_k);
}
|
Add device type USBOTG to redef.h | @@ -908,6 +908,7 @@ enum rt_device_class_type
RT_Device_Class_I2CBUS, /**< I2C bus device */
RT_Device_Class_USBDevice, /**< USB slave device */
RT_Device_Class_USBHost, /**< USB host bus */
+ RT_Device_Class_USBOTG, /**< USB OTG bus */
RT_Device_Class_SPIBUS, /**< SPI bus device */
RT_Device_Class_SPIDevice, /**< SPI device */
RT_Device_Class_SDIO, /**< SDIO bus device */
|
No other objects should be allocated before a typedarray is fully
initialized.
All members of an object must be valid when the garbage collector runs,
so no allocations are allowed during typed array initialization.
Fix issue
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang | @@ -214,6 +214,9 @@ ecma_typedarray_create_object_with_length (ecma_length_t array_length, /**< leng
lit_magic_string_id_t class_id) /**< class name of the typedarray */
{
ecma_length_t byte_length = array_length << element_size_shift;
+
+ ecma_value_t new_arraybuffer_p = ecma_make_object_value (ecma_arraybuffer_new_object (byte_length));
+
ecma_object_t *object_p = ecma_create_object (proto_p,
sizeof (ecma_extended_object_t),
ECMA_OBJECT_TYPE_PSEUDO_ARRAY);
@@ -222,8 +225,9 @@ ecma_typedarray_create_object_with_length (ecma_length_t array_length, /**< leng
ext_object_p->u.pseudo_array.u1.class_id = class_id;
ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY;
ext_object_p->u.pseudo_array.extra_info = element_size_shift;
- ext_object_p->u.pseudo_array.u2.arraybuffer = ecma_make_object_value (ecma_arraybuffer_new_object (byte_length));
- ecma_free_value (ext_object_p->u.pseudo_array.u2.arraybuffer);
+ ext_object_p->u.pseudo_array.u2.arraybuffer = new_arraybuffer_p;
+
+ ecma_free_value (new_arraybuffer_p);
return object_p;
} /* !ecma_typedarray_create_object_with_length */
|
edit for changing zl dependencies | @@ -54,6 +54,7 @@ xbendout.class.sources := cyclone_src/binaries/control/xbendout.c
xbendout2.class.sources := cyclone_src/binaries/control/xbendout2.c
xnotein.class.sources := cyclone_src/binaries/control/xnotein.c
xnoteout.class.sources := cyclone_src/binaries/control/xnoteout.c
+zl.class.sources := cyclone_src/binaries/control/zl.c
# NEW ones in cyclone0.3:
acosh.class.sources := cyclone_src/binaries/control/acosh.c
asinh.class.sources := cyclone_src/binaries/control/asinh.c
@@ -254,7 +255,6 @@ speedlim.class.sources := cyclone_src/binaries/control/speedlim.c $(hgrow)
substitute.class.sources := cyclone_src/binaries/control/substitute.c $(hgrow)
thresh.class.sources := cyclone_src/binaries/control/thresh.c $(hgrow)
tosymbol.class.sources := cyclone_src/binaries/control/tosymbol.c $(hgrow)
-zl.class.sources := cyclone_src/binaries/control/zl.c $(hgrow)
pv.class.sources := cyclone_src/binaries/control/pv.c $(hgrow)
# hgrowfitter classes
|
libhfcommon: convert msec to nsec | @@ -250,7 +250,7 @@ void util_sleepForMSec(uint64_t msec) {
}
struct timespec ts = {
.tv_sec = msec / 1000U,
- .tv_nsec = msec % 1000U,
+ .tv_nsec = (msec % 1000U) * 1000000U,
};
TEMP_FAILURE_RETRY(nanosleep(&ts, &ts));
}
|
filter_kubernetes: stop caching metadata for failed api server query | @@ -885,9 +885,12 @@ static int get_and_merge_meta(struct flb_kube *ctx, struct flb_kube_meta *meta,
char *api_buf;
size_t api_size;
- get_api_server_info(ctx,
+ ret = get_api_server_info(ctx,
meta->namespace, meta->podname,
&api_buf, &api_size);
+ if (ret == -1) {
+ return -1;
+ }
ret = merge_meta(meta, ctx,
api_buf, api_size,
|
ResetSystem: Support reboot into firmware | @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
+#include <Guid/GlobalVariable.h>
#include <Uefi.h>
#include <Library/BaseMemoryLib.h>
#include <Library/OcDebugLogLib.h>
@@ -33,6 +34,9 @@ UefiMain (
CHAR16 **Argv;
CHAR16 *Mode;
EFI_RESET_TYPE ResetMode;
+ UINT64 OsIndications;
+ UINT32 Attr;
+ UINTN DataSize;
Status = GetArguments (&Argc, &Argv);
if (!EFI_ERROR (Status) && Argc >= 2) {
@@ -42,6 +46,53 @@ UefiMain (
Mode = L"ColdReset";
}
+ if (StrCmp (Mode, L"Firmware") == 0) {
+ DEBUG ((DEBUG_INFO, "OCRST: Entering firmware...\n"));
+ DataSize = sizeof (OsIndications);
+ Status = gRT->GetVariable (
+ EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME,
+ &gEfiGlobalVariableGuid,
+ &Attr,
+ &DataSize,
+ &OsIndications
+ );
+ if (!EFI_ERROR (Status)) {
+ if ((OsIndications & EFI_OS_INDICATIONS_BOOT_TO_FW_UI) != 0) {
+ DataSize = sizeof (OsIndications);
+ Status = gRT->GetVariable (
+ EFI_OS_INDICATIONS_VARIABLE_NAME,
+ &gEfiGlobalVariableGuid,
+ &Attr,
+ &DataSize,
+ &OsIndications
+ );
+ if (!EFI_ERROR (Status)) {
+ OsIndications |= EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
+ } else {
+ OsIndications = EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
+ }
+ Status = gRT->SetVariable (
+ EFI_OS_INDICATIONS_VARIABLE_NAME,
+ &gEfiGlobalVariableGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ sizeof (OsIndications),
+ &OsIndications
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_WARN, "OCRST: Failed to set EFI_OS_INDICATIONS_BOOT_TO_FW_UI - %r\n", Status));
+ return EFI_ABORTED;
+ }
+ } else {
+ DEBUG ((DEBUG_WARN, "OCRST: Firmware do not support EFI_OS_INDICATIONS_BOOT_TO_FW_UI - %r\n", Status));
+ return EFI_UNSUPPORTED;
+ }
+ } else {
+ DEBUG ((DEBUG_WARN, "OCRST: Failed to acquire firmware features - %r\n", Status));
+ return EFI_NOT_FOUND;
+ }
+ Mode = L"ColdReset";
+ }
+
if (StrCmp (Mode, L"ColdReset") == 0) {
DEBUG ((DEBUG_INFO, "OCRST: Perform cold reset...\n"));
ResetMode = EfiResetCold;
|
pyocf: fix acp security test | @@ -239,7 +239,7 @@ def test_neg_set_acp_param(pyocf_ctx, cm, cls):
if i in [item.value for item in AcpParams]:
continue
with pytest.raises(OcfError, match="Error setting cleaning policy param"):
- cache.set_cleaning_policy_param(CleaningPolicy.ALRU, i, 1)
+ cache.set_cleaning_policy_param(CleaningPolicy.ACP, i, 1)
def get_acp_param_valid_rage(param_id):
|
xml BUGFIX ly_getutf8 return code check | @@ -606,7 +606,10 @@ lyxml_open_element(struct lyxml_ctx *xmlctx, const char *prefix, size_t prefix_l
/* parse and store all namespaces */
prev_input = xmlctx->in->current;
is_ns = 1;
- while ((xmlctx->in->current[0] != '\0') && !ly_getutf8(&xmlctx->in->current, &c, &parsed) && is_xmlqnamestartchar(c)) {
+ while ((xmlctx->in->current[0] != '\0') && !(ret = ly_getutf8(&xmlctx->in->current, &c, &parsed))) {
+ if (!is_xmlqnamestartchar(c)) {
+ break;
+ }
xmlctx->in->current -= parsed;
/* parse attribute name */
|
Linux Makefile: list "all" target before others
Change 24639 listed the "test" target before "all".
This change ensures that the stack and samples are built
when make is run without a target. | @@ -110,10 +110,10 @@ CONSTRAINED_LIBS = libiotivity-constrained-server.a libiotivity-constrained-clie
PC = iotivity-constrained-client.pc iotivity-constrained-server.pc \
iotivity-constrained-client-server.pc
-test: $(GTEST) $(UNIT_TESTS)
-
all: $(CONSTRAINED_LIBS) $(SAMPLES) $(PC)
+test: $(GTEST) $(UNIT_TESTS)
+
.PHONY: test clean
$(GTEST):
|
btc: match bridgeInvoice.js sending button style to invoice.js | @@ -221,9 +221,12 @@ export default class BridgeInvoice extends Component {
mr={3}
fontSize={1}
borderRadius='24px'
+ border='none'
height='48px'
onClick={() => this.sendBitcoin(txHex)}
- disabled={!this.state.ready || error}
+ disabled={!this.state.ready || error || this.state.broadcasting}
+ color={(this.state.ready && !error && !this.state.broadcasting) ? "white" : "lighterGray"}
+ backgroundColor={(this.state.ready && !error && !this.state.broadcasting) ? "green" : "veryLightGray"}
style={{cursor: (this.state.ready && !error) ? "pointer" : "default"}}
/>
{this.state.broadcasting ? <LoadingSpinner mr={3}/> : null}
|
chat-cli: update tab-complete to static gall | %det (edit +.dat.act)
%clr [~ all-state]
%ret obey
- %tab (tab +.act)
+ %tab (tab +.dat.act)
==
:: +tab-list: static list of autocomplete entries
++ tab-list
==
++ tab
|= pos=@ud
- ^- (quip move _this)
+ ^- (quip card state)
?. =(';' (snag 0 buf.state.cli))
- [~ this]
+ [~ all-state]
=+ (get-id:auto pos (tufa buf.state.cli))
=/ needle=term
(fall id '')
?: &(!=(pos 1) =(0 (met 3 needle)))
- [~ this] :: autocomplete empty command iff user at start of command
+ [~ all-state] :: autocomplete empty command iff user at start of command
=/ options=(list (option:auto tank))
(search-prefix:auto needle tab-list)
=/ advance=term
(trip (rsh 3 (met 3 needle) advance))
=/ send-pos
(add pos (met 3 (fall forward '')))
- =| moves=(list move)
+ =| moves=(list card)
=? moves ?=(^ options)
[(tab:sh-out options) moves]
=| fxs=(list sole-effect:sole-sur)
|-
?~ to-send
- [(flop moves) this]
+ [(flop moves) all-state]
=^ char state.cli
(~(transmit sole-lib state.cli) [%ins send-pos `@c`i.to-send])
%_ $
|
[awm2] Drop dead code | @@ -328,22 +328,6 @@ enum MouseInteractionState {
PerformingWindowResize(Rc<Window>),
}
-struct InteractionState {
- dragged_window: Option<Rc<Window>>,
- window_under_mouse: Option<Rc<Window>>,
- mouse_state: MouseInteractionState,
-}
-
-impl InteractionState {
- fn new() -> Self {
- Self {
- dragged_window: None,
- window_under_mouse: None,
- mouse_state: MouseInteractionState::BackgroundHover,
- }
- }
-}
-
pub enum RenderStrategy {
TreeWalk,
Composite,
@@ -361,7 +345,6 @@ pub struct Desktop {
mouse_interaction_state: MouseInteractionState,
compositor_state: CompositorState,
pub render_strategy: RenderStrategy,
- //interaction_state: InteractionState,
rng: SmallRng,
}
@@ -393,7 +376,6 @@ impl Desktop {
mouse_state: MouseState::new(initial_mouse_pos, desktop_frame.size),
compositor_state: CompositorState::new(),
render_strategy: RenderStrategy::Composite,
- //interaction_state: InteractionState::new(),
mouse_interaction_state: MouseInteractionState::BackgroundHover,
rng: SmallRng::seed_from_u64(seed),
}
|
Debugging: print the first 5 array values being set | @@ -692,10 +692,16 @@ int grib_set_double_array_internal(grib_handle* h, const char* name, const doubl
static int __grib_set_double_array(grib_handle* h, const char* name, const double* val, size_t length, int check)
{
double v=0;
- int constant,i;
+ size_t i=0;
- if (h->context->debug)
- fprintf(stderr, "ECCODES DEBUG grib_set_double_array key=%s %ld values\n",name,(long)length);
+ if (h->context->debug) {
+ size_t N=5;
+ if (length<=N) N=length;
+ fprintf(stderr, "ECCODES DEBUG grib_set_double_array key=%s %ld values (",name,(long)length);
+ for(i=0; i<N; ++i) fprintf(stderr," %g,", val[i]);
+ if (N >= length) fprintf(stderr, " )\n");
+ else fprintf(stderr, " ... )\n");
+ }
if (length==0) {
grib_accessor* a = grib_find_accessor(h, name);
@@ -708,6 +714,7 @@ static int __grib_set_double_array(grib_handle* h, const char* name, const doubl
if (!strcmp(name,"values") || !strcmp(name,"codedValues")) {
double missingValue;
int ret=0;
+ int constant=0;
ret=grib_get_double(h,"missingValue",&missingValue);
if (ret) missingValue=9999;
@@ -802,7 +809,13 @@ static int _grib_set_long_array(grib_handle* h, const char* name, const long* va
if (!a) return GRIB_NOT_FOUND ;
if (h->context->debug) {
- fprintf(stderr, "ECCODES DEBUG _grib_set_long_array key=%s %ld values\n",name,(long)length);
+ size_t i=0;
+ size_t N=5;
+ if (length<=N) N=length;
+ fprintf(stderr, "ECCODES DEBUG _grib_set_long_array key=%s %ld values (",name,(long)length);
+ for(i=0; i<N; ++i) fprintf(stderr," %ld,", val[i]);
+ if (N >= length) fprintf(stderr, " )\n");
+ else fprintf(stderr, " ... )\n");
}
if (name[0]=='/' || name[0]=='#' ) {
|
Bind all addresses for multihoming | @@ -2550,9 +2550,7 @@ combine_candidates(neat_flow *flow, struct neat_he_candidates *candidate_list)
if (!flow->isSCTPMultihoming) {
return;
}
- if (flow->user_ips == NULL) {
- return;
- }
+
neat_log(flow->ctx, NEAT_LOG_DEBUG, "%s", __func__);
TAILQ_FOREACH(candidate, candidate_list, next) {
|
Doc: Correct deduplicate_items varlistentry id.
Use a varlistentry id for the deduplicate_items storage parameter that
is derived from the name of the parameter itself.
This oversight happened because the storage parameter was renamed
relatively late during the development of the patch that became commit | @@ -399,7 +399,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
</para>
<variablelist>
- <varlistentry id="index-reloption-deduplication" xreflabel="deduplicate_items">
+ <varlistentry id="index-reloption-deduplicate-items" xreflabel="deduplicate_items">
<term><literal>deduplicate_items</literal> (<type>boolean</type>)
<indexterm>
<primary><varname>deduplicate_items</varname> storage parameter</primary>
|
Basking: Add CPT battery config
update CPT's config
BRANCH=firmware-reef-9042.B
TEST=`make -j BOARD=reef`
Tested-by: David Huang | @@ -313,40 +313,64 @@ static const struct fast_charge_params fast_chg_params_smp_c22n1626 = {
};
static const struct fast_charge_profile fast_charge_cpt_c22n1626_info[] = {
- /* < 0C */
+ /* < 1C */
[TEMP_RANGE_0] = {
- .temp_c = TEMPC_TENTHS_OF_DEG(-1),
+ .temp_c = TEMPC_TENTHS_OF_DEG(0),
.current_mA = {
[VOLTAGE_RANGE_0] = 0,
[VOLTAGE_RANGE_1] = 0,
+ [VOLTAGE_RANGE_2] = 0,
},
},
- /* >=0C && <=60C */
+ /* >=1C && <=10C */
[TEMP_RANGE_1] = {
+ .temp_c = TEMPC_TENTHS_OF_DEG(10),
+ .current_mA = {
+ [VOLTAGE_RANGE_0] = 1752,
+ [VOLTAGE_RANGE_1] = 1752,
+ [VOLTAGE_RANGE_2] = 1752,
+ },
+ },
+
+ /* 10C > && <=45C */
+ [TEMP_RANGE_2] = {
+ .temp_c = TEMPC_TENTHS_OF_DEG(45),
+ .current_mA = {
+ [VOLTAGE_RANGE_0] = 4600,
+ [VOLTAGE_RANGE_1] = 4600,
+ [VOLTAGE_RANGE_2] = 2920,
+ },
+ },
+
+ /* 45C > && <=60C */
+ [TEMP_RANGE_3] = {
.temp_c = TEMPC_TENTHS_OF_DEG(60),
.current_mA = {
- [VOLTAGE_RANGE_0] = 5200,
- [VOLTAGE_RANGE_1] = 5200,
+ [VOLTAGE_RANGE_0] = 2920,
+ [VOLTAGE_RANGE_1] = 0,
+ [VOLTAGE_RANGE_2] = 0,
},
},
/* >60C */
- [TEMP_RANGE_2] = {
+ [TEMP_RANGE_4] = {
.temp_c = TEMPC_TENTHS_OF_DEG(CHARGER_PROF_TEMP_C_LAST_RANGE),
.current_mA = {
[VOLTAGE_RANGE_0] = 0,
[VOLTAGE_RANGE_1] = 0,
+ [VOLTAGE_RANGE_2] = 0,
},
},
};
static const struct fast_charge_params fast_chg_params_cpt_c22n1626 = {
.total_temp_ranges = ARRAY_SIZE(fast_charge_cpt_c22n1626_info),
- .default_temp_range_profile = TEMP_RANGE_1,
+ .default_temp_range_profile = TEMP_RANGE_2,
.voltage_mV = {
- [VOLTAGE_RANGE_0] = 8000,
- [VOLTAGE_RANGE_1] = CHARGER_PROF_VOLTAGE_MV_LAST_RANGE,
+ [VOLTAGE_RANGE_0] = 8200,
+ [VOLTAGE_RANGE_1] = 8500,
+ [VOLTAGE_RANGE_2] = CHARGER_PROF_VOLTAGE_MV_LAST_RANGE,
},
.chg_profile_info = &fast_charge_cpt_c22n1626_info[0],
};
|
app/shell: Fix definitions of TASH debug
Build errors that occur due to shvdbg when TASH debug config is enabled
are fixed. | #ifdef CONFIG_DEBUG_TASH
#ifdef CONFIG_DEBUG_TASH_ERROR
#define shdbg(format, ...) dbg(format, ##__VA_ARGS__)
+#else
+#define shdbg(...)
#endif
#ifdef CONFIG_DEBUG_TASH_INFO
#define shvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+#else
+#define shvdbg(...)
#endif
#else /* !CONFIG_DEBUG_TASH */
#define shdbg(...)
|
update ya tool arc
checkout multiple paths at once
no free args for clean / fetch / pr
okernel_cache for fuse
set atime, ctime and mtime on readdir
don't try to obtain token via ssh
print info about TStatus::Unauthorized
stat for .arc files | },
"arc": {
"formula": {
- "sandbox_id": [309012290],
+ "sandbox_id": [311261386],
"match": "arc"
},
"executable": {
|
Enable VSCALE0 for revision V devices. | @@ -189,7 +189,16 @@ void SystemClock_Config(void)
/* The voltage scaling allows optimizing the power consumption when the device is
clocked below the maximum system frequency, to update the voltage scaling value
regarding system frequency refer to product datasheet. */
+ #if defined(MCU_SERIES_H7)
+ // Enable VSCALE0 for revision V devices.
+ if (HAL_GetREVID() >= 0x2003) {
+ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
+ } else {
+ #else
+ if (1) {
+ #endif
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
+ }
// Wait for PWR_FLAG_VOSRDY
#if defined(MCU_SERIES_F4) || defined(MCU_SERIES_F7)
|
Fixed advanced search behavior when advanced entity are enabled
When clicking the search button it now correctly searches for the elements set in the advacned search interface
and not for the previous search. | @@ -819,6 +819,7 @@ AjaxFranceLabs.AdvancedSearchWidget = AjaxFranceLabs.AbstractWidget.extend({
}
// Replace the query that was in the manager by the finalFilter value
+ this.manager.store.remove('entQ');
this.manager.store.remove('q');
this.manager.store.addByValue('q', finalFilter);
|
vlib: add process restart cli | #include <vlib/vlib.h>
#include <vppinfra/cpu.h>
+#include <unistd.h>
/* Root of all show commands. */
/* *INDENT-OFF* */
@@ -757,6 +758,25 @@ VLIB_CLI_COMMAND (cmd_test_heap_validate,static) = {
};
/* *INDENT-ON* */
+static clib_error_t *
+restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ char *newenviron[] = { NULL };
+
+ execve (vm->name, (char **) vm->argv, newenviron);
+
+ return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (restart_cmd,static) = {
+ .path = "restart",
+ .short_help = "restart process",
+ .function = restart_cmd_fn,
+};
+/* *INDENT-ON* */
+
#ifdef TEST_CODE
/*
* A trivial test harness to verify the per-process output_function
|
Updated wget URL on rpm install | @@ -82,7 +82,7 @@ The AOMP bin directory (which includes the standard clang and llvm binaries) is
### RPM Install
For rpm-based Linux distributions, use this rpm
```
-wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.6-0/aomp-0.6-0.x86_64.rpm
+wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.6-0/aomp-0.6-0.arm64.rpm
sudo rpm -i aomp-0.6-0.x86_64.rpm
```
|
sub shm BUGFIX missing read and write unlock on error
Fixes | @@ -590,7 +590,7 @@ sr_shmsub_change_notify_update(struct sr_mod_info_s *mod_info, sr_sid_t sid, uin
/* remap sub SHM once we have the lock, it will do anything only on the first call */
err_info = sr_shm_remap(&shm_sub, sizeof *multi_sub_shm + diff_lyb_len);
if (err_info) {
- goto cleanup;
+ goto cleanup_wrunlock;
}
multi_sub_shm = (sr_multi_sub_shm_t *)shm_sub.addr;
@@ -604,7 +604,7 @@ sr_shmsub_change_notify_update(struct sr_mod_info_s *mod_info, sr_sid_t sid, uin
/* notify using event pipe and wait until all the subscribers have processed the event */
if ((err_info = sr_shmsub_change_notify_evpipe(mod_info->conn->ext_shm.addr, mod, mod_info->ds,
SR_SUB_EV_UPDATE, cur_priority))) {
- goto cleanup;
+ goto cleanup_wrunlock;
}
/* SUB WRITE UNLOCK */
@@ -631,7 +631,7 @@ sr_shmsub_change_notify_update(struct sr_mod_info_s *mod_info, sr_sid_t sid, uin
/* remap sub SHM */
if ((err_info = sr_shm_remap(&shm_sub, 0))) {
- goto cleanup;
+ goto cleanup_rdunlock;
}
multi_sub_shm = (sr_multi_sub_shm_t *)shm_sub.addr;
@@ -641,7 +641,7 @@ sr_shmsub_change_notify_update(struct sr_mod_info_s *mod_info, sr_sid_t sid, uin
if (ly_errno) {
sr_errinfo_new_ly(&err_info, ly_ctx);
sr_errinfo_new(&err_info, SR_ERR_VALIDATION_FAILED, NULL, "Failed to parse \"update\" edit.");
- goto cleanup;
+ goto cleanup_rdunlock;
}
/* event fully processed */
@@ -669,7 +669,15 @@ sr_shmsub_change_notify_update(struct sr_mod_info_s *mod_info, sr_sid_t sid, uin
}
/* success */
+ goto cleanup;
+cleanup_wrunlock:
+ /* SUB WRITE UNLOCK */
+ sr_rwunlock(&multi_sub_shm->lock, SR_LOCK_WRITE, __func__);
+ goto cleanup;
+cleanup_rdunlock:
+ /* SUB READ UNLOCK */
+ sr_rwunlock(&multi_sub_shm->lock, SR_LOCK_READ, __func__);
cleanup:
free(diff_lyb);
sr_shm_clear(&shm_sub);
@@ -1207,7 +1215,7 @@ sr_shmsub_oper_notify(const struct lys_module *ly_mod, const char *xpath, const
/* notify using event pipe and wait until the subscriber has processed the event */
if ((err_info = sr_shmsub_notify_evpipe(evpipe_num))) {
- goto cleanup;
+ goto cleanup_wrunlock;
}
/* SUB WRITE UNLOCK */
|
Improved world editor spacing | @@ -30,6 +30,7 @@ class WorldEditor extends Component {
<div className="WorldEditor">
<h2>Settings</h2>
+ <div>
<FormField>
<label>
<input
@@ -53,6 +54,7 @@ class WorldEditor extends Component {
Show Connections
</label>
</FormField>
+ </div>
<h2>Start Map</h2>
@@ -67,33 +69,32 @@ class WorldEditor extends Component {
</label>
</FormField>
- <FormField>
- <label className="HalfWidth">
- X
+ <FormField halfWidth>
+ <label htmlFor="startX">X</label>
<input
+ id="startX"
type="number"
value={project.startX || 0}
min={1}
onChange={this.onEdit("startX")}
/>
- </label>
</FormField>
- <FormField>
- <label className="HalfWidth">
- Y
+ <FormField halfWidth>
+ <label htmlFor="startY">Y</label>
<input
+ id="startY"
type="number"
value={project.startY || 0}
min={1}
onChange={this.onEdit("startY")}
/>
- </label>
</FormField>
<FormField>
- <label>Direction</label>
+ <label htmlFor="startDirection">Direction</label>
<DirectionPicker
+ id="startDirection"
value={project.startDirection || 0}
onChange={this.onEdit("startDirection")}
/>
|
Add deployment for GitHub releases in Travis. | @@ -33,6 +33,7 @@ dist: trusty
env:
global:
- DOCKER_COMPOSE_VERSION: 1.22.0
+ - GHR_VERSION: 0.12.0
- GIT_SUBMODULE_STRATEGY: recursive
- IMAGE_REGISTRY: registry.hub.docker.com
- IMAGE_NAME: registry.hub.docker.com/$TRAVIS_REPO_SLUG
@@ -45,7 +46,7 @@ addons:
before_install:
- sudo rm /usr/local/bin/docker-compose
- - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
+ - curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
@@ -54,7 +55,13 @@ script:
- $TRAVIS_BUILD_DIR/docker-compose.sh build-cache
- $TRAVIS_BUILD_DIR/docker-compose.sh pack
-# TODO: Deploy to GitHub
-#after_script:
-# - docker pull tsub/ghr
-# - docker run -v $TRAVIS_BUILD_DIR:/work -w /work -e GITHUB_TOKEN=$GITHUB_TOKEN ghr --username user --repository repo v1.0.0 pkg/
+after_script:
+ - curl -sL https://github.com/tcnksm/ghr/releases/download/v${GHR_VERSION}/ghr_v${GHR_VERSION}_linux_amd64.tar.gz | tar zx
+ - chmod +x ghr_v${GHR_VERSION}_linux_amd64/ghr
+ - sudo mv ghr_v${GHR_VERSION}_linux_amd64/ghr /usr/local/bin
+ - |
+ ghr -t $GITHUB_TOKEN -u $GITHUB_USER -r $TRAVIS_REPO_SLUG -c $TRAVIS_COMMIT \
+ -n "Test Automated Releases" -b "From Travis" -replace \
+ v0.1.8 $ARTIFACTS_PATH/packages/
+
+# - docker run -v $TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR -w $TRAVIS_BUILD_DIR ghr -t -u user -r $TRAVIS_REPO_SLUG -replace $TRAVIS_TAG $ARTIFACTS_PATH/packages/
|
Fix comments (#endif flags) | @@ -5023,10 +5023,7 @@ static int ssl_use_opaque_psk( mbedtls_ssl_context const *ssl )
return( 0 );
}
#endif /* MBEDTLS_USE_PSA_CRYPTO &&
- ( MBEDTLS_KEY_EXCHANGE_PSK_ENABLED ||
- MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED ||
- MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED ||
- MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED ) */
+ MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED */
/*
* Compute master secret if needed
@@ -5096,7 +5093,7 @@ static int ssl_compute_master( mbedtls_ssl_handshake_params *handshake,
MBEDTLS_SSL_DEBUG_BUF( 3, "session hash for extended master secret",
session_hash, seed_len );
}
-#endif /* MBEDTLS_SSL_EXTENDED_MS_ENABLED */
+#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */
#if defined(MBEDTLS_USE_PSA_CRYPTO) && \
defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
|
Turn off software debounce for platform cooja buttons | @@ -155,6 +155,8 @@ typedef unsigned long clock_time_t;
/* Virtual button on pin 3 */
#define COOJA_BTN_PIN 3
+
+#define BUTTON_HAL_CONF_DEBOUNCE_DURATION 0
/*---------------------------------------------------------------------------*/
/* Virtual LED colors */
#define LEDS_CONF_COUNT 3
|
hw/battery: Fix assert check in shell_register | @@ -428,5 +428,5 @@ battery_shell_register(void)
SYSINIT_PANIC_ASSERT_MSG(rc == 0, "Failed to register battery shell");
bat = os_dev_open("battery_0", 0, NULL);
- SYSINIT_PANIC_ASSERT_MSG(rc == 0, "Failed to open battery device");
+ SYSINIT_PANIC_ASSERT_MSG(bat != NULL, "Failed to open battery device");
}
|
VERSION bump to version 1.4.68 | @@ -37,7 +37,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 4)
-set(SYSREPO_MICRO_VERSION 67)
+set(SYSREPO_MICRO_VERSION 68)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
Always include pg_config --libdir as lib directory when building extended test binary | -LIBPQ = $(shell pg_config --includedir)
+LIBPQ_INCLUDE = $(shell pg_config --includedir)
+LIBPQ_LIB = $(shell pg_config --libdir)
.PHONY: check
all: extended
extended:
- $(CC) extended.c -I$(LIBPQ) -lpq -o $@
+ $(CC) extended.c -I$(LIBPQ_INCLUDE) -L$(LIBPQ_LIB) -lpq -o $@
test: all
py.test -v
|
Shell command 'rpl_status': show last DTSN of current parent | @@ -174,7 +174,7 @@ PT_THREAD(cmd_rpl_status(struct pt *pt, shell_output_func output, char *args))
SHELL_OUTPUT(output, "-- State: %s\n", rpl_state_to_str(curr_instance.dag.state));
SHELL_OUTPUT(output, "-- Preferred parent: ");
shell_output_6addr(output, rpl_neighbor_get_ipaddr(curr_instance.dag.preferred_parent));
- SHELL_OUTPUT(output, "\n");
+ SHELL_OUTPUT(output, " (last DTSN: %u)\n", curr_instance.dag.preferred_parent->dtsn);
SHELL_OUTPUT(output, "-- Rank: %u\n", curr_instance.dag.rank);
SHELL_OUTPUT(output, "-- Lowest rank: %u (%u)\n", curr_instance.dag.lowest_rank, curr_instance.max_rankinc);
SHELL_OUTPUT(output, "-- DTSN out: %u\n", curr_instance.dtsn_out);
|
unroll each() loops in base function stratum | @@ -205,7 +205,8 @@ end
local function collect(keylist, dict)
local r = {}
- for k in each(keylist) do
+ for i = 1, int(keylist.n) or len(keylist) do
+ local k = keylist[i]
r[k] = dict[k]
end
return r
@@ -257,8 +258,8 @@ end
local function hoist(keylist, dict)
local r = {}
- for k in each(keylist) do
- merge(r, dict[k])
+ for i = 1, int(keylist.n) or len(keylist) do
+ merge(r, dict[keylist[i]])
end
return not isempty(r) and r or nil
end
|
clay: more printing adjustment | ^- path
=/ paz (segments pax)
|- ^- path
- ?~ paz ~_(leaf/"clay: no files match /{<pre>}/{<pax>}/hoon" !!)
+ ?~ paz ~_(leaf/"clay: no files match /{(trip pre)}/{(trip pax)}/hoon" !!)
=/ pux=path pre^(snoc i.paz %hoon)
?: (~(has in deletes) pux)
$(paz t.paz)
%+ turn (tail (spud pux)) :: lose leading '/'
|=(c=@tD `@tD`?:(=('/' c) '-' c)) :: convert '/' to '-'
::
- ~> %slog.0^leaf/"ford: {<~(wyt in invalid)>} cache invalidations"
- ::
:* ((invalidate path vase) files.ford-cache invalid)
((invalidate mark vase) naves.ford-cache invalid)
((invalidate mark dais) marks.ford-cache invalid)
|
check better for valid pointers in free in debug mode | @@ -199,9 +199,6 @@ static void mi_decl_noinline mi_free_generic(const mi_segment_t* segment, mi_pag
// Free a block
void mi_free(void* p) mi_attr_noexcept
{
- // optimize: merge null check with the segment masking (below)
- //if (p == NULL) return;
-
#if (MI_DEBUG>0)
if (mi_unlikely(((uintptr_t)p & (MI_INTPTR_SIZE - 1)) != 0)) {
_mi_error_message("trying to free an invalid (unaligned) pointer: %p\n", p);
@@ -211,15 +208,19 @@ void mi_free(void* p) mi_attr_noexcept
const mi_segment_t* const segment = _mi_ptr_segment(p);
if (segment == NULL) return; // checks for (p==NULL)
- bool local = (_mi_thread_id() == segment->thread_id); // preload, note: putting the thread_id in the page->flags does not improve performance
#if (MI_DEBUG>0)
+ if (mi_unlikely(!mi_is_in_heap_region(p))) {
+ _mi_warning_message("possibly trying to mi_free a pointer that does not point to a valid heap region: %p\n"
+ "(this may still be a valid very large allocation (over 64MiB))\n", p);
+ }
if (mi_unlikely(_mi_ptr_cookie(segment) != segment->cookie)) {
_mi_error_message("trying to mi_free a pointer that does not point to a valid heap space: %p\n", p);
return;
}
#endif
+ bool local = (_mi_thread_id() == segment->thread_id); // preload, note: putting the thread_id in the page->flags does not improve performance
mi_page_t* page = _mi_segment_page_of(segment, p);
#if (MI_STAT>1)
|
Attempt to fix hanging build | @@ -51,7 +51,7 @@ jobs:
# Setup compilation mode and install project dependencies
- name: Configure xmake and install dependencies
- run: xmake.exe config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes
+ run: xmake.exe config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes -j1
# Build the game
- name: Build
|
Documentation change only: clarify usage of uNetworkSetStatusCallback().
Clarify that uNetworkSetStatusCallback() won't work until uNetworkUp() has returned successfully. | @@ -252,10 +252,12 @@ int32_t uNetworkInterfaceUp(uDeviceHandle_t devHandle, uNetworkType_t netType,
int32_t uNetworkInterfaceDown(uDeviceHandle_t devHandle, uNetworkType_t netType);
/** Enable or disable a callback which will be called when
- * the network status changes. IMPORTANT: the actions that
- * might be taken by the application when a network has
- * gone down unexpectedly are different depending on the
- * underlying network type:
+ * the network status changes; cannot be called until
+ * uNetworkInterfaceUp() has returned succesfully, calling
+ * uNetworkInterfaceDown() will cancel the callback.
+ * IMPORTANT: the actions that might be taken by the application
+ * when a network has gone down unexpectedly are different
+ * depending on the underlying network type:
*
* BLE and Wi-Fi: if the isUp parameter passed to the callback
* is false, the network has dropped, it
|
Add docs for cloning and building ports in readme. | - [Abstract](#abstract)
- [Table Of Contents](#table-of-contents)
- - [1. License](#1-license)
+ - [1. Build System](#1-build-system)
+ - [2. License](#2-license)
<!-- /TOC -->
-## 1. License
+## 1. Build System
+
+Follow these steps to build and install **METACALL** manually.
+
+``` sh
+git clone --recursive https://github.com/metacall/ports.git
+mkdir ports/build && cd ports/build
+cmake ..
+make
+make test
+sudo make install
+```
+
+## 2. License
**METACALL Ports** is licensed under **[Apache License Version 2.0](/LICENSE)**.
|
graph-store: update indices of leaf posts | ++ convert-unix-timestamped-node
|= =node:store
^- node:store
+ =. index.post.node
+ (convert-unix-timestamped-index index.post.node)
?. ?=(%graph -.children.node)
node
- :+ post.node(index (convert-unix-timestamped-index index.post.node))
+ :+ post.node
%graph
(convert-unix-timestamped-graph p.children.node)
::
|
Add missing assertion and set cu before | @@ -1893,11 +1893,15 @@ static void search_pu_inter(encoder_state_t * const state,
*inter_bitcost = 0; // TODO: Check this
}
- if (*inter_cost < INT_MAX && cur_pu->inter.mv_dir == 1) {
+ *cur_pu = *best_inter_pu;
+
+ if (*inter_cost < MAX_DOUBLE && cur_pu->inter.mv_dir & 1) {
assert(fracmv_within_tile(&info, cur_pu->inter.mv[0][0], cur_pu->inter.mv[0][1]));
}
- *cur_pu = *best_inter_pu;
+ if (*inter_cost < MAX_DOUBLE && cur_pu->inter.mv_dir & 2) {
+ assert(fracmv_within_tile(&info, cur_pu->inter.mv[1][0], cur_pu->inter.mv[1][1]));
+ }
}
/**
|
ci update refs | @@ -214,7 +214,7 @@ installer:
needs:
- build-windows-64
variables:
- PLUGIN_REF: ci/multi #TODO main
+ PLUGIN_REF: main
AGENT_REF: $CI_COMMIT_REF_NAME
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
@@ -222,7 +222,7 @@ installer:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
variables:
- TRIGGER_BRANCH: ci/multi #TODO devel
+ TRIGGER_BRANCH: devel
inherit:
variables: false
trigger:
|
perf-tools/tau: %{PROJ_DELIM} -> %{PROJ_NAME} | @@ -33,7 +33,7 @@ Patch3: tau-disable_examples.patch
Patch4: tau-ucontext.patch
Patch5: tau-testplugins_makefile.patch
-Provides: lib%PNAME.so()(64bit)(%PROJ_DELIM)
+Provides: lib%PNAME.so()(64bit)(%PROJ_NAME)
Provides: perl(ebs2otf)
Conflicts: lib%pname < %version-%release
Obsoletes: lib%pname < %version-%release
|
[hardware] Clean the Verilator build folder when rebuilding
Verilator might fail if built in a dirty directory | @@ -169,7 +169,7 @@ VERILATOR_FLAGS += $(VERILATOR_WAIVE)
# VERILATOR_FLAGS += --debug
$(VERILATOR_MK): $(VERILATOR_CONF) $(VERILATOR_WAIVE) $(MEMPOOL_DIR)/Bender.yml $(shell find {src,tb,deps} -type f) $(bender) $(config_mk) Makefile
- mkdir -p $(verilator_build)
+ rm -rf $(verilator_build); mkdir -p $(verilator_build)
# Overwrite Bootaddress to L2 base while we don't have a DPI to write a wake-up
$(eval boot_addr=$(l2_base))
# Create Bender script of all RTL files
|
Added package dependencies for netcore on debian sid for tools/configenv.sh. | @@ -85,7 +85,7 @@ sub_netcore(){
$SUDO_CMD apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
$SUDO_CMD apt-get update
- $SUDO_CMD apt-get -y install dotnet-dev-1.0.0-preview2.1-003177
+ $SUDO_CMD apt-get -y install libssl1.0.0 dotnet-sharedframework-microsoft.netcore.app-1.1.0 dotnet-dev-1.0.0-preview2.1-003177
}
# V8 Repository
|
fix of registering resources to the cloud | @@ -231,11 +231,6 @@ oc_main_init(const oc_handler_t *handler)
oc_swupdate_init();
#endif /* OC_SOFTWARE_UPDATE */
-#ifdef OC_SERVER
- if (app_callbacks->register_resources)
- app_callbacks->register_resources();
-#endif
-
#ifdef OC_SECURITY
size_t device;
for (device = 0; device < oc_core_get_num_devices(); device++) {
@@ -267,6 +262,12 @@ oc_main_init(const oc_handler_t *handler)
OC_DBG("oc_main_init(): loading cloud");
#endif /* OC_CLIENT && OC_SERVER && OC_CLOUD */
+#ifdef OC_SERVER
+// initialize after cloud because their can be registered to cloud.
+ if (app_callbacks->register_resources)
+ app_callbacks->register_resources();
+#endif
+
OC_DBG("oc_main: stack initialized");
initialized = true;
|
[tools] Fix eclipse configuration for lib paths. | @@ -218,6 +218,15 @@ def HandleToolOption(tools, env, project, reset):
for lib in env['LIBS']:
SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': lib})
+ # update lib paths
+ if option.get('id').find('c.linker.paths') != -1 and env.has_key('LIBPATH'):
+ # remove old lib paths
+ for item in option.findall('listOptionValue'):
+ option.remove(item)
+ # add new old lib paths
+ for path in env['LIBPATH']:
+ SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': path})
+
return
|
fix: tiny typo
Spotted tiny typo on README.md | @@ -6,7 +6,7 @@ Want to try your hand at game making? Open one of the already existing modules a
Ready to make something of your own? Get some images together and away you go!
-Feeling ambitious? Delve into the built-in script engine and graphical suite to build a masterpiece rivaling the most outlandish Triple-A productions. Sell it if you if can!
+Feeling ambitious? Delve into the built-in script engine and graphical suite to build a masterpiece rivaling the most outlandish Triple-A productions. Sell it if you can!
To find out more, stop into the OpenBOR community at [ChronoCrash.com](https://www.chronocrash.com/). You will also find dozens of game modules already finished to download and play.
|
vere: consistently handle %meld $writ in king | @@ -116,6 +116,7 @@ _lord_writ_free(u3_writ* wit_u)
case u3_writ_save:
case u3_writ_cram:
+ case u3_writ_meld:
case u3_writ_pack:
case u3_writ_exit: {
} break;
@@ -209,6 +210,7 @@ _lord_writ_str(u3_writ_type typ_e)
case u3_writ_play: return "play";
case u3_writ_save: return "save";
case u3_writ_cram: return "cram";
+ case u3_writ_meld: return "meld";
case u3_writ_pack: return "pack";
case u3_writ_exit: return "exit";
}
|
wincng: do not disable key validation that can be enabled
The modular exponentiation also works with key validation enabled. | @@ -1982,9 +1982,7 @@ _libssh2_wincng_bignum_mod_exp(_libssh2_bn *r,
memcpy(key + offset, m->bignum, m->length);
ret = BCryptImportKeyPair(_libssh2_wincng.hAlgRSA, NULL,
- BCRYPT_RSAPUBLIC_BLOB, &hKey, key, keylen,
- BCRYPT_NO_KEY_VALIDATION);
-
+ BCRYPT_RSAPUBLIC_BLOB, &hKey, key, keylen, 0);
if(BCRYPT_SUCCESS(ret)) {
ret = BCryptEncrypt(hKey, a->bignum, a->length, NULL, NULL, 0,
NULL, 0, &length, BCRYPT_PAD_NONE);
|
Add explanatory comment about fitting into a size_t. | @@ -207,6 +207,8 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
if (maxmem == 0)
maxmem = SCRYPT_MAX_MEM;
+
+ /* Check that the maximum memory doesn't exceed a size_t limits */
if (maxmem > SIZE_MAX)
maxmem = SIZE_MAX;
|
Adding sys/stat.h to src/platform/posix/posix_aio.h for building with musl | #include "posix_pollq.h"
#include <sys/types.h> // needed for mode_t
+#include <sys/stat.h> // needed for musl build
typedef struct nni_posix_pipedesc nni_posix_pipedesc;
typedef struct nni_posix_epdesc nni_posix_epdesc;
|
Update OSX environment to Sierra
as homebrew seems to have dropped support for El Capitan in their gcc packages | @@ -149,7 +149,7 @@ matrix:
- &test-macos
os: osx
- osx_image: xcode8
+ osx_image: xcode8.3
before_script:
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=NEHALEM NUM_THREADS=32"
- brew update
|
Support for versions in tags. | @@ -67,20 +67,22 @@ generic sysseladdlist = {syssel, base, attrs, val
match std.strfind(a, ":")
| `std.Some i:
n = a[:i]
- v = parseversion(a[1:])
+ v = parseversion(a[i+1:])
| `std.None:
n = a
v = (-1, -1, -1)
;;
- if !std.hthas(syssel.sysattrs, n)
+ match std.htget(syssel.sysattrs, n)
+ | `std.None:
nmatch = -1
break
- ;;
- if newenough(syssel, a, v)
+ | `std.Some av:
+ if newenough(syssel, av, v)
nmatch++
;;
;;
+ ;;
curbest = std.htgetv(syssel._match, base, -1)
if curbest < nmatch
std.htput(syssel._match, base, nmatch)
@@ -89,7 +91,14 @@ generic sysseladdlist = {syssel, base, attrs, val
}
const newenough = {syssel, attr, vers
+ match (attr, vers)
+ | ((a0, a1, a2), (v0, v1, v2)):
+ if a0 == -1 && a1 == -1 && a2 == -1
-> true
+ else
+ -> a0 >= v0 && a1 >= v1 && a2 >= v2
+ ;;
+ ;;
}
generic sysselfin = {syssel
@@ -112,13 +121,14 @@ generic sysselfin = {syssel
const addsysattrs = {b, tags
var tagfile
+ std.htput(b.tags, opt_sys, opt_sysvers)
match opt_sys
- | "freebsd": tag(b.tags, ["freebsd", "posixy"][:])
- | "netbsd": tag(b.tags, ["netbsd", "posixy"][:])
- | "openbsd": tag(b.tags, ["openbsd", "posixy"][:])
- | "osx": tag(b.tags, ["osx", "posixy"][:])
- | "linux": tag(b.tags, ["linux", "posixy"][:])
- | "plan9": tag(b.tags, ["plan9"][:])
+ | "freebsd": std.htput(b.tags, "posixy", (-1, -1, -1))
+ | "netbsd": std.htput(b.tags, "posixy", (-1, -1, -1))
+ | "openbsd": std.htput(b.tags, "posixy", (-1, -1, -1))
+ | "osx": std.htput(b.tags, "posixy", (-1, -1, -1))
+ | "linux": std.htput(b.tags, "posixy", (-1, -1, -1))
+ | "plan9":
| unknown: std.fatal("unknown system \"{}\"\n", unknown)
;;
@@ -128,7 +138,7 @@ const addsysattrs = {b, tags
;;
tag(b.tags, tags)
- tagfile = std.pathcat(b.basedir, "systags")
+ tagfile = std.pathcat(b.basedir, " bld.tag")
if std.fexists(tagfile)
loadtagfile(b, tagfile)
;;
|
Add helper macros | #endif
#if defined(__cplusplus) && __cplusplus >= 201103L
+# define CLAP_HAS_CXX11
# define CLAP_CONSTEXPR constexpr
#else
# define CLAP_CONSTEXPR
#endif
#if defined(__cplusplus) && __cplusplus >= 201703L
+# define CLAP_HAS_CXX17
# define CLAP_NODISCARD [[nodiscard]]
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201300L
# define CLAP_NODISCARD [[nodiscard]]
#else
# define CLAP_NODISCARD
#endif
+
+#if defined(__cplusplus) && __cplusplus >= 202002L
+# define CLAP_HAS_CXX20
+#endif
|
Utiltites:fix Legacy Boot fdisk syntax mistyping | @@ -30,7 +30,7 @@ then
fi
# Write MBR
-sudo fdisk -f boot0 -u /dev/rdisk"${N}" -y
+sudo fdisk -uy -f boot0 /dev/rdisk"${N}"
diskutil umount disk"${N}"s1
sudo dd if=/dev/rdisk"${N}"s1 count=1 of=origbs
|
HLS: Improve debug output | @@ -87,6 +87,7 @@ static void read_table1(snap_membus_t *mem, table1_t t1[TABLE1_SIZE],
/* extract data into target table1, or FIFO maybe? */
j = 0;
for (i = 0; i < t1_used_bytes/sizeof(table1_t); i++) {
+ printf("reading table1 entry %d\n", i);
*t1[i].name = mem[j](0, 511);
t1[i].age = mem[j + 1](0, 31);
j += 2;
@@ -101,6 +102,7 @@ static void read_table2(snap_membus_t *mem, table2_t t2[TABLE2_SIZE],
/* extract data into target table2, or FIFO maybe? */
j = 0;
for (i = 0; i < t2_used_bytes/sizeof(table2_t); i++) {
+ printf("reading table2 entry %d\n", i);
*t2[i].name = mem[j](0, 511);
*t2[i].animal = mem[j + 1](0, 511);
j += 2;
@@ -117,6 +119,7 @@ static void write_table3(snap_membus_t *mem, table3_t t3[TABLE3_SIZE],
for (i = 0; i < t3_used_bytes/sizeof(table3_t); i++) {
snap_membus_t dmem;
+ printf("writing table3 entry %d\n", i);
dmem(0, 31) = t3[i].age;
mem[j] = *t3[i].name;
mem[j + 1] = *t3[i].animal;
@@ -311,8 +314,10 @@ int main(void)
cout << "HOSTMEMORY INPUT" << endl;
for (unsigned int i = 0; i < 2048; i++)
+ if (din_gmem[i] != 0)
cout << setw(4) << setfill('0') << i << ": "
- << setw(32) << setfill('0') << hex << din_gmem[i] << endl;
+ << setw(32) << setfill('0') << hex << din_gmem[i]
+ << endl;
Action_Input.Data.t1.address = 0;
Action_Input.Data.t1.size = sizeof(table1);
@@ -327,12 +332,15 @@ int main(void)
cout << "HOSTMEMORY OUTPUT" << endl;
for (unsigned int i = 0; i < 2048; i++)
+ if (dout_gmem[i] != 0)
cout << setw(4) << setfill('0') << i << ": "
- << setw(32) << setfill('0') << hex << dout_gmem[i] << endl;
+ << setw(32) << setfill('0') << hex << dout_gmem[i]
+ << endl;
printf("Number of entries in t3: %d\n", (int)Action_Output.Data.t3_produced);
- if (Action_Output.Data.t3_produced != 23)
+ if (Action_Output.Data.t3_produced != 23) {
return 1;
+ }
return 0;
}
|
Remove flags unsupported on GHC 7.8, add -Werror | @@ -98,7 +98,7 @@ script:
esac
- export LD_LIBRARY_PATH=${HOME}/usr/lib:$LD_LIBRARY_PATH
- echo $CABAL_CONFIG_ARGS
- - cabal configure --enable-tests --disable-optimization --ghc-options="-j +RTS -A128m -n2m -RTS" $CABAL_CONFIG_ARGS
+ - cabal configure --enable-tests --disable-optimization --ghc-options="-Werror" $CABAL_CONFIG_ARGS
- cabal build
- cabal test
- cabal copy
|
Always expect 5 parameters for the server
The client always sends all the arguments, so there is no need to check. | @@ -46,35 +46,24 @@ public final class Server {
@SuppressWarnings("checkstyle:MagicNumber")
private static Options createOptions(String... args) {
+ if (args.length != 5)
+ throw new IllegalArgumentException("Expecting 5 parameters");
+
Options options = new Options();
- if (args.length < 1) {
- return options;
- }
+
int maxSize = Integer.parseInt(args[0]) & ~7; // multiple of 8
options.setMaxSize(maxSize);
- if (args.length < 2) {
- return options;
- }
int bitRate = Integer.parseInt(args[1]);
options.setBitRate(bitRate);
- if (args.length < 3) {
- return options;
- }
// use "adb forward" instead of "adb tunnel"? (so the server must listen)
boolean tunnelForward = Boolean.parseBoolean(args[2]);
options.setTunnelForward(tunnelForward);
- if (args.length < 4) {
- return options;
- }
Rect crop = parseCrop(args[3]);
options.setCrop(crop);
- if (args.length < 5) {
- return options;
- }
boolean sendFrameMeta = Boolean.parseBoolean(args[4]);
options.setSendFrameMeta(sendFrameMeta);
|
Reorganize some switch cases | @@ -277,9 +277,34 @@ func (q *checker) bcheckStatement(n *a.Node) error {
}
return nil
+ case a.KIOBind:
+ n := n.IOBind()
+ if err := q.bcheckBlock(n.Body()); err != nil {
+ return err
+ }
+ // TODO: invalidate any facts regarding the io_bind expressions.
+ return nil
+
case a.KIf:
return q.bcheckIf(n.If())
+ case a.KIterate:
+ n := n.Iterate()
+ for _, o := range n.Variables() {
+ if err := q.bcheckVar(o.Var()); err != nil {
+ return err
+ }
+ }
+ // TODO: this isn't right, as the body is a loop, not an
+ // execute-exactly-once block. We should have pre / inv / post
+ // conditions, a la bcheckWhile.
+ for _, o := range n.Body() {
+ if err := q.bcheckStatement(o); err != nil {
+ return err
+ }
+ }
+ return nil
+
case a.KJump:
n := n.Jump()
skip := t.IDPost
@@ -303,31 +328,6 @@ func (q *checker) bcheckStatement(n *a.Node) error {
case a.KVar:
return q.bcheckVar(n.Var())
- case a.KIOBind:
- n := n.IOBind()
- if err := q.bcheckBlock(n.Body()); err != nil {
- return err
- }
- // TODO: invalidate any facts regarding the io_bind expressions.
- return nil
-
- case a.KIterate:
- n := n.Iterate()
- for _, o := range n.Variables() {
- if err := q.bcheckVar(o.Var()); err != nil {
- return err
- }
- }
- // TODO: this isn't right, as the body is a loop, not an
- // execute-exactly-once block. We should have pre / inv / post
- // conditions, a la bcheckWhile.
- for _, o := range n.Body() {
- if err := q.bcheckStatement(o); err != nil {
- return err
- }
- }
- return nil
-
case a.KWhile:
return q.bcheckWhile(n.While())
|
DM USB: xHCI: rename the variable mf_prev_time
Just changed the name of the variable and didn't change any emulation
code logic.
Acked-by: Yu Wang | @@ -418,7 +418,7 @@ struct pci_xhci_vdev {
* hub ports and its child external hub ports.
*/
struct pci_xhci_native_port native_ports[XHCI_MAX_VIRT_PORTS];
- struct timespec mf_prev_time; /* previous time of accessing MFINDEX */
+ struct timespec init_time;
};
/* portregs and devices arrays are set up to start from idx=1 */
@@ -3614,9 +3614,9 @@ pci_xhci_rtsregs_read(struct pci_xhci_vdev *xdev, uint64_t offset)
if (offset == XHCI_MFINDEX) {
clock_gettime(CLOCK_MONOTONIC, &t);
- time_diff = (t.tv_sec - xdev->mf_prev_time.tv_sec) * 1000000
- + (t.tv_nsec - xdev->mf_prev_time.tv_nsec) / 1000;
- xdev->mf_prev_time = t;
+ time_diff = (t.tv_sec - xdev->init_time.tv_sec) * 1000000
+ + (t.tv_nsec - xdev->init_time.tv_nsec) / 1000;
+ xdev->init_time = t;
value = time_diff / 125;
if (value >= 1)
@@ -4166,7 +4166,7 @@ pci_xhci_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
xdev->excap_ptr = NULL;
xdev->rtsregs.mfindex = 0;
- clock_gettime(CLOCK_MONOTONIC, &xdev->mf_prev_time);
+ clock_gettime(CLOCK_MONOTONIC, &xdev->init_time);
/* discover devices */
error = pci_xhci_parse_opts(xdev, opts);
|
fix tools/scripts/nfsock | @@ -6,6 +6,7 @@ import sys
import argparse
import subprocess as sp
import yaml
+import json
def warn(*lines, **kwargs):
@@ -33,7 +34,7 @@ Convert NF data tree from YAML to a more readable form.
""",
epilog="""
""")
- argparser.add_argument("mpool", nargs='?', help="name of mpool (eg, mp1)" )
+ argparser.add_argument("kvdb_home", nargs='?', help="kvdb home dir (eg, /var/hse/kvdb1" )
argparser.add_argument( "-h", dest="help", help="show help", action="store_true")
argparser.add_argument( "-d", dest="describe", help="show descriptions (for perf counters)", action="store_true")
argparser.add_argument( "-p", dest="perfc", help="show perf counters only", action="store_true")
@@ -244,12 +245,24 @@ def main(args):
op.config = False
pass
- mpool = vars(op).get("mpool",False)
- if not mpool:
- fatal("Must specify mpool, use -h for help")
+ kvdb_home = vars(op).get("kvdb_home",False)
+ if not kvdb_home:
+ fatal("Must specify kvdb_home, use -h for help")
pass
- sock = os.path.join(mpool, 'hse.sock')
+ pid_file = os.path.join(kvdb_home, 'kvdb.pid')
+ try:
+ fh = open(pid_file)
+ except:
+ fatal(f"Cannot open pid file: {pid_file}")
+ try:
+ js = json.load(fh)
+ sock = js['socket']['path']
+ except:
+ fatal(f"Cannot get socket.path from pid file {pid_file}")
+
+ fh.close()
+
url = "http://localhost/data"
curl_cmd = ['curl', '-s', '--noproxy', 'localhost', '--unix-socket', sock, url]
|
Fix for CVE-2019-5477 | @@ -205,7 +205,7 @@ GEM
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
multipart-post (2.0.0)
- nokogiri (1.9.1)
+ nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
octokit (4.13.0)
sawyer (~> 0.8.0, >= 0.5.3)
|
Fix typo in MultitrackStudio | @@ -115,7 +115,7 @@ and use to get a basic plugin experience:
## Hosts
- [Bitwig](https://bitwig.com), you need at least _Bitwig Studio 4.3 Beta 5_
-- [Multitrackstudio](https://www.multitrackstudio.com/), you need at least _Multitrack Studio 10.4.1_
+- [MultitrackStudio](https://www.multitrackstudio.com/), you need at least _MultitrackStudio 10.4.1_
- [Qtractor](https://www.qtractor.org)
## Examples
|
Fix bug with infinite timeout handling | @@ -2854,7 +2854,12 @@ HRESULT CLR_RT_ExecutionEngine::InitTimeout( CLR_INT64& timeExpire, const CLR_IN
if(timeout < 0)
{
- if(timeout != -1L)
+ // because we are expecting the timeout value to be in ticks
+ // need to check for two possible infinite timeouts:
+ // 1. when coding in native it's supposed to use -1L as a timeout infinite
+ // 2. in managed code the constant System.Threading.Timeout.Infinite is -1 milliseconds, therefore needs to be converted to ticks
+ if( (timeout != -1L) &&
+ (timeout != -1L * TIME_CONVERSION__TO_MILLISECONDS))
{
NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
}
|
Catch build failures | @@ -45,12 +45,17 @@ def windowsLinuxElfBuild(String label, String version, String compiler, String b
unstash "linux-${label}-${compiler}-${build_type}-lvi_mitigation=${lvi_mitigation}-${version}-${BUILD_NUMBER}"
bat 'move build linuxbin'
dir('build') {
- bat """
- vcvars64.bat x64 && \
- cmake.exe ${WORKSPACE} -G Ninja -DADD_WINDOWS_ENCLAVE_TESTS=ON -DBUILD_ENCLAVES=OFF -DCMAKE_BUILD_TYPE=${build_type} -DLINUX_BIN_DIR=${WORKSPACE}\\linuxbin\\tests -DLVI_MITIGATION=${lvi_mitigation} -DLVI_MITIGATION_SKIP_TESTS=${lvi_mitigation_skip_tests} -DNUGET_PACKAGE_PATH=C:/oe_prereqs -Wdev && \
- ninja -v && \
- ctest.exe -V -C ${build_type} --timeout ${CTEST_TIMEOUT_SECONDS}
+ bat(
+ returnStdout: false,
+ returnStatus: false,
+ script: """
+ call vcvars64.bat x64
+ setlocal EnableDelayedExpansion
+ cmake.exe ${WORKSPACE} -G Ninja -DADD_WINDOWS_ENCLAVE_TESTS=ON -DBUILD_ENCLAVES=OFF -DCMAKE_BUILD_TYPE=${build_type} -DLINUX_BIN_DIR=${WORKSPACE}\\linuxbin\\tests -DLVI_MITIGATION=${lvi_mitigation} -DLVI_MITIGATION_SKIP_TESTS=${lvi_mitigation_skip_tests} -DNUGET_PACKAGE_PATH=C:/oe_prereqs -Wdev || exit !ERRORLEVEL!
+ ninja -v || exit !ERRORLEVEL!
+ ctest.exe -V -C ${build_type} --timeout ${CTEST_TIMEOUT_SECONDS} || exit !ERRORLEVEL!
"""
+ )
}
}
}
|
hv: print current sched_object in acrn logmsg
Add a header field in acrnlog message to indicate the current
running thread.
Acked-by: Eddie Dong | @@ -40,6 +40,7 @@ void do_logmsg(uint32_t severity, const char *fmt, ...)
bool do_mem_log;
bool do_npk_log;
char *buffer;
+ struct thread_object *current;
do_console_log = (((logmsg_ctl.flags & LOG_FLAG_STDOUT) != 0U) && (severity <= console_loglevel));
do_mem_log = (((logmsg_ctl.flags & LOG_FLAG_MEMORY) != 0U) && (severity <= mem_loglevel));
@@ -58,11 +59,12 @@ void do_logmsg(uint32_t severity, const char *fmt, ...)
/* Get CPU ID */
pcpu_id = get_pcpu_id();
buffer = per_cpu(logbuf, pcpu_id);
+ current = sched_get_current(pcpu_id);
(void)memset(buffer, 0U, LOG_MESSAGE_MAX_SIZE);
/* Put time-stamp, CPU ID and severity into buffer */
- snprintf(buffer, LOG_MESSAGE_MAX_SIZE, "[%luus][cpu=%hu][sev=%u][seq=%u]:",
- timestamp, pcpu_id, severity, atomic_inc_return(&logmsg_ctl.seq));
+ snprintf(buffer, LOG_MESSAGE_MAX_SIZE, "[%luus][cpu=%hu][%s][sev=%u][seq=%u]:",
+ timestamp, pcpu_id, current->name, severity, atomic_inc_return(&logmsg_ctl.seq));
/* Put message into remaining portion of local buffer */
va_start(args, fmt);
|
Limit ChangeLog entry to 80 characters | Changes
- * Calling AEAD tag-specific functions for non-AEAD algorithms (which should not
- be done - they are documented for use only by AES-GCM and ChaCha20+Poly1305)
- now returns MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE instead of success (0).
+ * Calling AEAD tag-specific functions for non-AEAD algorithms (which
+ should not be done - they are documented for use only by AES-GCM and
+ ChaCha20+Poly1305) now returns MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
+ instead of success (0).
|
Version bumped to 1.2 (configure.ac). | # Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([goaccess], [1.1.1], [[email protected]], [], [http://goaccess.io])
+AC_INIT([goaccess], [1.2], [[email protected]], [], [http://goaccess.io])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/goaccess.c])
AC_CONFIG_HEADERS([src/config.h])
|
Modify the script suffix .s to .S | @@ -5,7 +5,7 @@ cwd = GetCurrentDir()
src = Glob('*.c')
if rtconfig.CROSS_TOOL == 'gcc':
- src += ['startup_gcc/startup_m2sxxx.s']
+ src += ['startup_gcc/startup_m2sxxx.S']
elif rtconfig.CROSS_TOOL == 'keil':
src += ['startup_arm/startup_m2sxxx.s']
|
support macOS 10.14 | @@ -85,7 +85,9 @@ else ifeq ($(OS),Darwin)
# Figure out which crash reporter to use.
CRASHWRANGLER := third_party/mac
OS_VERSION := $(shell sw_vers -productVersion)
- ifneq (,$(findstring 10.13,$(OS_VERSION)))
+ ifneq (,$(findstring 10.14,$(OS_VERSION)))
+ CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o
+ else ifneq (,$(findstring 10.13,$(OS_VERSION)))
CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o
else ifneq (,$(findstring 10.12,$(OS_VERSION)))
CRASH_REPORT := $(CRASHWRANGLER)/CrashReport_Sierra.o
|
docs: Fix install link | @@ -20,6 +20,6 @@ programs are and how Inspektor Gadget uses them is briefly explained here:
## Further Reading
* [Read more about the architecture](architecture.md)
-* [Learn how to install Inspektor Gadget](installation.md)
+* [Learn how to install Inspektor Gadget](install.md)
* [Kernel requirements for each gadget](requirements.md)
* [Using `Trace` resources](custom-resources.md)
|
readline-devel on yum | @@ -48,7 +48,7 @@ test_tools()
install_tools()
{
{ apt-get --version >/dev/null 2>&1 && $sudoprefix apt-get install -y git build-essential libreadline-dev; } ||
- { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git && $sudoprefix yum groupinstall -y 'Development Tools'; } ||
+ { yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git readline-devel && $sudoprefix yum groupinstall -y 'Development Tools'; } ||
{ zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } ||
{ pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm git base-devel; }
}
|
Build BPF generator using the builder pattern | @@ -7,6 +7,6 @@ import (
func RegisterRouterSys(r *gin.Engine) {
data := sys.Data{}
- r.POST("/data/collect", data.Collect)
+ r.POST("/data/collect", data.Handle)
//r.POST("/data/display")
}
|
[chainmaker][#436]add test_01CreateWallet_0003 | @@ -53,10 +53,6 @@ START_TEST(test_01CreateWallet_0001CreateOneTimeWalletSuccess)
BoatHlchainmakerWalletConfig wallet_config = get_chainmaker_wallet_settings();
extern BoatIotSdkContext g_boat_iot_sdk_context;
- /* 1. prepare test conditions*/
- wallet_config.user_prikey_config.prikey_genMode = BOAT_WALLET_PRIKEY_GENMODE_EXTERNAL_INJECTION;
- wallet_config.user_prikey_config.prikey_type = BOAT_WALLET_PRIKEY_TYPE_SECP256R1;
-
/* 1. execute unit test */
rtnVal = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, NULL, &wallet_config, sizeof(BoatHlchainmakerWalletConfig));
@@ -94,7 +90,31 @@ START_TEST(test_01CreateWallet_0002CreateOneTimeWalletFailureNullConfig)
}
END_TEST
+START_TEST(test_01CreateWallet_0003CreatePersistWalletSuccess)
+{
+ BSINT32 rtnVal;
+ BoatHlchainmakerWalletConfig wallet_config = get_chainmaker_wallet_settings();
+ extern BoatIotSdkContext g_boat_iot_sdk_context;
+
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, "chainmaker", &wallet_config, sizeof(BoatHlchainmakerWalletConfig));
+
+ /* 2. verify test result */
+ /* 2-1. verify the return value */
+ ck_assert_int_eq(rtnVal, 0);
+
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, "chainmaker", &wallet_config, sizeof(BoatHlchainmakerWalletConfig));
+
+ /* 2. verify test result */
+ /* 2-1. verify the return value */
+ ck_assert_int_eq(rtnVal, 1);
+ /* 2-2. verify the global variables that be affected */
+ ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == true);
+ ck_assert(g_boat_iot_sdk_context.wallet_list[1].is_used == true);
+}
+END_TEST
Suite *make_wallet_suite(void)
{
@@ -109,6 +129,7 @@ Suite *make_wallet_suite(void)
/* Test cases are added to the test set */
tcase_add_test(tc_wallet_api, test_01CreateWallet_0001CreateOneTimeWalletSuccess);
tcase_add_test(tc_wallet_api, test_01CreateWallet_0002CreateOneTimeWalletFailureNullConfig);
+ tcase_add_test(tc_wallet_api, test_01CreateWallet_0003CreatePersistWalletSuccess);
return s_wallet;
}
|
drv_spi: check for dma phase in spi_dma_is_ready | @@ -320,18 +320,19 @@ static void spi_dma_transmit_init(spi_ports_t port, uint8_t *base_address_out, u
}
uint8_t spi_dma_is_ready(spi_ports_t port) {
- return DMA_TRANSFER_DONE;
-}
-
-bool spi_dma_wait_for_ready(spi_ports_t port) {
#ifdef BRUSHLESS_TARGET
if (port == SPI_PORT1) {
extern volatile int dshot_dma_phase;
- while (dshot_dma_phase != 0)
- ;
+ if (dshot_dma_phase != 0) {
+ return 0;
+ }
}
#endif
- for (uint16_t timeout = 0x400; DMA_TRANSFER_DONE == 0; timeout--) {
+ return DMA_TRANSFER_DONE;
+}
+
+bool spi_dma_wait_for_ready(spi_ports_t port) {
+ for (uint16_t timeout = 0x400; spi_dma_is_ready(port) == 0; timeout--) {
if (timeout == 0) {
//liberror will trigger failloop 7 during boot, or 20 liberrors will trigger failloop 8 in flight
liberror++;
|
Use standard operator | @@ -175,8 +175,7 @@ struct TDumper<NCB::TExclusiveBundlePart> {
static inline void Dump(S& s, const NCB::TExclusiveBundlePart& exclusiveBundlePart) {
s << "FeatureType=" << exclusiveBundlePart.FeatureType
<< ",FeatureIdx=" << exclusiveBundlePart.FeatureIdx
- << ",BoundsInBundle=[" << exclusiveBundlePart.Bounds.Begin << ","
- << exclusiveBundlePart.Bounds.End << ")";
+ << ",BoundsInBundle=" << exclusiveBundlePart.Bounds;
}
};
|
testing null deference fix | @@ -2264,7 +2264,8 @@ int picoquic_incoming_segment(
if (ret == 0) {
if (cnx != NULL && cnx->cnx_state != picoquic_state_disconnected &&
- ph.ptype != picoquic_packet_version_negotiation) {
+ ph.ptype != picoquic_packet_version_negotiation && ph.l_cid) {
+
cnx->nb_packets_received++;
/* Mark the sequence number as received */
ret = picoquic_record_pn_received(cnx, ph.pc, ph.l_cid, ph.pn64, receive_time);
|
Fix EP hashing in overwrite mode in SMBIOS | @@ -1860,16 +1860,24 @@ SmbiosTableApply (
TableEntryPoint = mOriginalSmbios;
TableEntryPoint3 = mOriginalSmbios3;
TableAddress = (VOID *)(UINTN) TableEntryPoint->TableAddress;
- TableAddress3 = mOriginalSmbios3 != NULL ? (VOID *)(UINTN) TableAddress : NULL;
+ ZeroMem (TableEntryPoint, sizeof (SMBIOS_TABLE_ENTRY_POINT));
+ if (TableEntryPoint3 != NULL) {
+ TableAddress3 = (VOID *)(UINTN) TableEntryPoint3->TableAddress;
+ ZeroMem (TableEntryPoint3, sizeof (SMBIOS_TABLE_3_0_ENTRY_POINT));
+ } else {
+ TableAddress3 = NULL;
+ }
}
- CopyMem (TableAddress,
+ CopyMem (
+ TableAddress,
SmbiosTable->Table,
TableLength
);
if (TableAddress3 != NULL && TableAddress3 != TableAddress) {
- CopyMem (TableAddress3,
+ CopyMem (
+ TableAddress3,
SmbiosTable->Table,
TableLength
);
@@ -1892,13 +1900,13 @@ SmbiosTableApply (
TableEntryPoint->TableAddress = (UINT32)(UINTN) TableAddress;
TableEntryPoint->NumberOfSmbiosStructures = SmbiosTable->NumberOfStructures;
TableEntryPoint->SmbiosBcdRevision = 0x32;
+ TableEntryPoint->IntermediateChecksum = CalculateCheckSum8 (
+ (UINT8 *) TableEntryPoint + OFFSET_OF (SMBIOS_TABLE_ENTRY_POINT, IntermediateAnchorString),
+ TableEntryPoint->EntryPointLength - OFFSET_OF (SMBIOS_TABLE_ENTRY_POINT, IntermediateAnchorString)
+ );
TableEntryPoint->EntryPointStructureChecksum = CalculateCheckSum8 (
(UINT8 *) TableEntryPoint,
- SMBIOS_ENTRY_POINT_CHECKSUM_SIZE
- );
- TableEntryPoint->IntermediateChecksum = CalculateCheckSum8 (
- (UINT8 *) TableEntryPoint + SMBIOS_ENTRY_POINT_CHECKSUM_SIZE,
- TableEntryPoint->EntryPointLength - SMBIOS_ENTRY_POINT_CHECKSUM_SIZE
+ TableEntryPoint->EntryPointLength
);
if (TableEntryPoint3 != NULL) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.