message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Check the return from BN_sub() in BN_X931_generate_Xpq(). | @@ -184,8 +184,10 @@ int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx)
for (i = 0; i < 1000; i++) {
if (!BN_priv_rand(Xq, nbits, BN_RAND_TOP_TWO, BN_RAND_BOTTOM_ANY))
goto err;
+
/* Check that |Xp - Xq| > 2^(nbits - 100) */
- BN_sub(t, Xp, Xq);
+ if (!BN_sub(t, Xp, Xq))
+ goto err;
if (BN_num_bits(t) > (nbits - 100))
break;
}
|
GRIB2: Add correct MARS level mapping for sea ice and snow layer | @@ -82,7 +82,7 @@ if (extraDim) {
}
}
-# See ECC-854
+# See ECC-854, ECC-1435
if( (typeOfFirstFixedSurface == 151 && typeOfSecondFixedSurface == 151) ||
(typeOfFirstFixedSurface == 152 && typeOfSecondFixedSurface == 152) ||
(typeOfFirstFixedSurface == 114 && typeOfSecondFixedSurface == 114) ) {
|
Enable the CC13x0/CC26x0 ROM bootloader by default | * @{
*/
#ifndef ROM_BOOTLOADER_ENABLE
-#define ROM_BOOTLOADER_ENABLE 0
+#define ROM_BOOTLOADER_ENABLE 1
#endif
/** @} */
/*---------------------------------------------------------------------------*/
|
open the pinned map file first, then create it if it does not exist | @@ -1635,12 +1635,6 @@ static int ebpf_map_delete(int fd, const void *key)
return syscall(__NR_bpf, BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));
}
-static int file_exist(const char *path)
-{
- struct stat s;
- return stat(path, &s) == 0;
-}
-
static int return_map_fd = -1; // for h2o_return
int h2o_socket_ebpf_setup(void)
@@ -1662,8 +1656,14 @@ int h2o_socket_ebpf_setup(void)
goto Exit;
}
- if (!file_exist(H2O_EBPF_RETURN_MAP_PATH)) {
- // creates a map and pinns the map to BPF fs
+ fd = ebpf_obj_get(H2O_EBPF_RETURN_MAP_PATH);
+ if (fd < 0) {
+ if (errno != ENOENT) {
+ h2o_perror("BPF_OBJ_GET failed");
+ goto Exit;
+ }
+
+ // when the pinned map file does not exist, creates a map and pinns the map to the BPF filesystem
fd = ebpf_map_create(map_attr.type, map_attr.key_size, map_attr.value_size, H2O_EBPF_RETURN_MAP_SIZE,
H2O_EBPF_RETURN_MAP_NAME);
if (fd < 0) {
@@ -1685,13 +1685,7 @@ int h2o_socket_ebpf_setup(void)
goto Exit;
}
success = 1;
- } else {
- // the pinned map file already exist
- fd = ebpf_obj_get(H2O_EBPF_RETURN_MAP_PATH);
- if (fd < 0) {
- h2o_perror("BPF_MAP_CREATE failed");
- goto Exit;
- }
+ } else { // when BPF_OBJ_GET succeeded
// make sure the critical attributes (type, key size, value size) are correct.
// otherwise usdt-selective-tracing does not work.
struct bpf_map_info m;
@@ -1735,7 +1729,8 @@ static void get_map_fd(h2o_loop_t *loop, const char *map_path, int *fd, uint64_t
*last_attempt = now;
- if (!file_exist(map_path)) {
+ struct stat s;
+ if (stat(map_path, &s) != 0) {
// map path unavailable, cleanup fd if needed and leave
if (*fd >= 0) {
close(*fd);
|
stm32: Fixed lp gpio initialization | @@ -422,7 +422,7 @@ int _stm32_pwrEnterLPStop(void)
*(stm32_common.exti + exti_pr) |= 0xffffffff;
- /* Enter Stop mode (wfi instruction) */
+ /* Enter Stop mode */
__asm__ volatile ("\
dmb; \
wfe; \
@@ -958,6 +958,8 @@ void _stm32_wdgReload(void)
void _stm32_init(void)
{
u32 t, i;
+ static const int gpio2pctl[] = { pctl_gpioa, pctl_gpiob, pctl_gpioc,
+ pctl_gpiod, pctl_gpioe, pctl_gpiof, pctl_gpiog, pctl_gpioh };
/* Base addresses init */
stm32_common.rcc = (void *)0x40023800;
@@ -1039,11 +1041,11 @@ void _stm32_init(void)
#endif
/* Init all GPIOs to Ain mode to lower power consumption */
- for (; i <= pctl_gpioh - pctl_gpioa; ++i) {
- _stm32_rccSetDevClock(pctl_gpioa + i, 1);
+ for (; i <= pctl_gpiog - pctl_gpioa; ++i) {
+ _stm32_rccSetDevClock(gpio2pctl[i], 1);
*(stm32_common.gpio[i] + gpio_moder) = 0xffffffff;
*(stm32_common.gpio[i] + gpio_pupdr) = 0;
- _stm32_rccSetDevClock(pctl_gpioa + i, 0);
+ _stm32_rccSetDevClock(gpio2pctl[i], 0);
}
/* Set the internal regulator output voltage to 1.5V */
|
Memory leak in standby master (gpsyncagent process) | @@ -6136,6 +6136,23 @@ SyncAgentMain(int argc, char *argv[], const char *username)
if (whereToSendOutput == DestDebug)
printf("\nPostgreSQL stand-alone backend %s\n", PG_VERSION);
+ /*
+ * Create the memory context we will use in the main loop.
+ *
+ * MessageContext is reset once per iteration of the main loop, ie, upon
+ * completion of processing of each command message from the client.
+ *
+ * Fix memory leak: HAWQ-1594
+ * SyncAgent doesn't allocate memory through the memory context
+ * other than input buffer, but for the consistency with PostgresMain,
+ * we define MessageContext and switch to it at the beginning of loop,
+ * so that we can create another context in case we need one in the future.
+ */
+ MessageContext = AllocSetContextCreate(TopMemoryContext,
+ "MessageContext",
+ ALLOCSET_DEFAULT_MINSIZE,
+ ALLOCSET_DEFAULT_INITSIZE,
+ ALLOCSET_DEFAULT_MAXSIZE);
/*
* POSTGRES main processing loop begins here
*
@@ -6236,6 +6253,14 @@ SyncAgentMain(int argc, char *argv[], const char *username)
*/
doing_extended_query_message = false;
+ /*
+ * Fix memory leak: HAWQ-1594
+ * Release storage left over from prior query cycle, and create a new
+ * query input buffer in the cleared MessageContext.
+ */
+ MemoryContextSwitchTo(MessageContext);
+ MemoryContextResetAndDeleteChildren(MessageContext);
+
initStringInfo(&input_message);
/*
|
example: Colorize long header packet number | @@ -215,9 +215,10 @@ void print_indent() { fprintf(outfile, " "); }
namespace {
void print_pkt_long(ngtcp2_dir dir, const ngtcp2_pkt_hd *hd) {
fprintf(outfile,
- "%s%s%s(0x%02x) CID=0x%016" PRIx64 " PKN=%" PRIu64 " V=0x%08x\n",
+ "%s%s%s(0x%02x) CID=0x%016" PRIx64 " PKN=%s%" PRIu64 "%s V=0x%08x\n",
pkt_ansi_esc(dir), strpkttype_long(hd->type).c_str(), ansi_escend(),
- hd->type, hd->conn_id, hd->pkt_num, hd->version);
+ hd->type, hd->conn_id, pkt_num_ansi_esc(dir), hd->pkt_num,
+ ansi_escend(), hd->version);
}
} // namespace
|
updates for gnu7, superlu_dist tests | @@ -30,7 +30,7 @@ for compiler in $COMPILER_FAMILIES ; do
module load $mpi || exit 1
module load $mpi || exit 1
- if [[ "${compiler}" == "gnu" ]];then
+ if [[ "${compiler}" =~ "gnu" ]];then
module load scalapack || exit 1
module load openblas || exit 1
fi
|
Fix failing build
GCC flags no return as a warning, but clang doesn't seem to, so this
failed in the (Linux) CI environment but not on my desktop. | @@ -735,6 +735,8 @@ static const char *get_trap_name(enum trap_type type)
TRAP_ENTRY(SUPERVISOR_ACCESS)
TRAP_ENTRY(NOT_EXECUTABLE)
TRAP_ENTRY(BREAKPOINT)
+ default:
+ return "???";
}
#undef TRAP_ENTRY
}
|
sway/input: don't pass possibly invalid modifiers pointer
active_keyboard may be NULL, in which case an invalid pointer could be
passed to wlr_input_method_keyboard_grab_v2_send_modifiers. This
procedure call is unnecessary since wlroots commit "input
method: send modifiers in set_keyboard", so the call can simply be
removed.
Fixes | @@ -77,8 +77,6 @@ static void handle_im_grab_keyboard(struct wl_listener *listener, void *data) {
struct wlr_keyboard *active_keyboard = wlr_seat_get_keyboard(relay->seat->wlr_seat);
wlr_input_method_keyboard_grab_v2_set_keyboard(keyboard_grab,
active_keyboard);
- wlr_input_method_keyboard_grab_v2_send_modifiers(keyboard_grab,
- &active_keyboard->modifiers);
wl_signal_add(&keyboard_grab->events.destroy,
&relay->input_method_keyboard_grab_destroy);
|
Raise exception in get_tid() if header could not be parsed
HTSlib 1.10's header API added a new error code to bam_name2id()
indicating invalid headers. Distinguish this from no-such-reference
by raising an exception in this rare case. Fixes | @@ -522,7 +522,10 @@ cdef class AlignmentHeader(object):
returns -1 if reference is not known.
"""
reference = force_bytes(reference)
- return bam_name2id(self.ptr, reference)
+ tid = bam_name2id(self.ptr, reference)
+ if tid < -1:
+ raise ValueError('could not parse header')
+ return tid
def __str__(self):
'''string with the full contents of the :term:`sam file` header as a
|
pbio/ioport: populate port field
This was never initialized. Since pbdrv/motor still uses the legacy pattern with a port argument, we need this to turn sensor power on and off.
We may be able to drop the port attribute once we reorganize ioports more generally. See also | @@ -508,6 +508,7 @@ PROCESS_THREAD(pbdrv_ioport_lpf2_process, ev, data) {
if (ioport->connected_type_id == PBIO_IODEV_TYPE_ID_LPF2_UNKNOWN_UART) {
ioport_enable_uart(ioport);
pbio_uartdev_get(i, &ioport->iodev);
+ ioport->iodev->port = i + PBDRV_CONFIG_FIRST_IO_PORT;
} else if (ioport->connected_type_id == PBIO_IODEV_TYPE_ID_NONE) {
ioport->iodev = NULL;
} else {
|
Fix PhCreateProcessIgnoreIfeoDebugger thread safety issues | @@ -1341,9 +1341,10 @@ BOOLEAN PhCreateProcessIgnoreIfeoDebugger(
result = FALSE;
- // This is NOT thread-safe.
+ RtlEnterCriticalSection(NtCurrentPeb()->FastPebLock);
originalValue = NtCurrentPeb()->ReadImageFileExecOptions;
NtCurrentPeb()->ReadImageFileExecOptions = FALSE;
+ RtlLeaveCriticalSection(NtCurrentPeb()->FastPebLock);
memset(&startupInfo, 0, sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
@@ -1364,7 +1365,9 @@ BOOLEAN PhCreateProcessIgnoreIfeoDebugger(
if (processInfo.hThread)
NtClose(processInfo.hThread);
+ RtlEnterCriticalSection(NtCurrentPeb()->FastPebLock);
NtCurrentPeb()->ReadImageFileExecOptions = originalValue;
+ RtlLeaveCriticalSection(NtCurrentPeb()->FastPebLock);
return result;
}
|
intr_alloc: port*_CRITICAL vanilla FreeRTOS compliance | @@ -494,7 +494,7 @@ static void IRAM_ATTR shared_intr_isr(void *arg)
{
vector_desc_t *vd=(vector_desc_t*)arg;
shared_vector_desc_t *sh_vec=vd->shared_vec_info;
- portENTER_CRITICAL(&spinlock);
+ portENTER_CRITICAL_ISR(&spinlock);
while(sh_vec) {
if (!sh_vec->disabled) {
if ((sh_vec->statusreg == NULL) || (*sh_vec->statusreg & sh_vec->statusmask)) {
@@ -512,7 +512,7 @@ static void IRAM_ATTR shared_intr_isr(void *arg)
}
sh_vec=sh_vec->next;
}
- portEXIT_CRITICAL(&spinlock);
+ portEXIT_CRITICAL_ISR(&spinlock);
}
#if CONFIG_SYSVIEW_ENABLE
@@ -520,7 +520,7 @@ static void IRAM_ATTR shared_intr_isr(void *arg)
static void IRAM_ATTR non_shared_intr_isr(void *arg)
{
non_shared_isr_arg_t *ns_isr_arg=(non_shared_isr_arg_t*)arg;
- portENTER_CRITICAL(&spinlock);
+ portENTER_CRITICAL_ISR(&spinlock);
traceISR_ENTER(ns_isr_arg->source+ETS_INTERNAL_INTR_SOURCE_OFF);
// FIXME: can we call ISR and check port_switch_flag after releasing spinlock?
// when CONFIG_SYSVIEW_ENABLE = 0 ISRs for non-shared IRQs are called without spinlock
@@ -529,7 +529,7 @@ static void IRAM_ATTR non_shared_intr_isr(void *arg)
if (!port_switch_flag[xPortGetCoreID()]) {
traceISR_EXIT();
}
- portEXIT_CRITICAL(&spinlock);
+ portEXIT_CRITICAL_ISR(&spinlock);
}
#endif
@@ -794,7 +794,7 @@ int esp_intr_get_cpu(intr_handle_t handle)
esp_err_t IRAM_ATTR esp_intr_enable(intr_handle_t handle)
{
if (!handle) return ESP_ERR_INVALID_ARG;
- portENTER_CRITICAL(&spinlock);
+ portENTER_CRITICAL_SAFE(&spinlock);
int source;
if (handle->shared_vector_desc) {
handle->shared_vector_desc->disabled=0;
@@ -810,14 +810,14 @@ esp_err_t IRAM_ATTR esp_intr_enable(intr_handle_t handle)
if (handle->vector_desc->cpu!=xPortGetCoreID()) return ESP_ERR_INVALID_ARG; //Can only enable these ints on this cpu
ESP_INTR_ENABLE(handle->vector_desc->intno);
}
- portEXIT_CRITICAL(&spinlock);
+ portEXIT_CRITICAL_SAFE(&spinlock);
return ESP_OK;
}
esp_err_t IRAM_ATTR esp_intr_disable(intr_handle_t handle)
{
if (!handle) return ESP_ERR_INVALID_ARG;
- portENTER_CRITICAL(&spinlock);
+ portENTER_CRITICAL_SAFE(&spinlock);
int source;
bool disabled = 1;
if (handle->shared_vector_desc) {
@@ -850,7 +850,7 @@ esp_err_t IRAM_ATTR esp_intr_disable(intr_handle_t handle)
}
ESP_INTR_DISABLE(handle->vector_desc->intno);
}
- portEXIT_CRITICAL(&spinlock);
+ portEXIT_CRITICAL_SAFE(&spinlock);
return ESP_OK;
}
|
os/include: Add DEBUGASSERT_INFO macro for descriptive debug outputs in case of DEBUGASSERT
DEBUGASSERT_INFO gives out a descriptive output similar to ASSERT_INFO in case of DEBUGASSERTs | @@ -103,6 +103,14 @@ extern char assert_info_str[CONFIG_STDIO_BUFFER_SIZE];
#ifdef CONFIG_DEBUG
+#define DEBUGASSERT_INFO(f, fmt, ...) \
+ { \
+ if (!(f)) { \
+ snprintf(assert_info_str, CONFIG_STDIO_BUFFER_SIZE, fmt, ##__VA_ARGS__); \
+ up_assert((const uint8_t *)__FILE__, (int)__LINE__); \
+ } \
+ }
+
#define DEBUGASSERT(f) \
{ if (!(f)) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
@@ -114,6 +122,7 @@ extern char assert_info_str[CONFIG_STDIO_BUFFER_SIZE];
#else
+#define DEBUGASSERT_INFO(f, fmt, ...)
#define DEBUGASSERT(f)
#define DEBUGVERIFY(f) ((void)(f))
#define DEBUGPANIC()
@@ -157,6 +166,13 @@ extern char assert_info_str[CONFIG_STDIO_BUFFER_SIZE];
#ifdef CONFIG_DEBUG
+#define DEBUGASSERT_INFO(f, fmt, ...) \
+ { \
+ if (!(f)) { \
+ snprintf(assert_info_str, CONFIG_STDIO_BUFFER_SIZE, fmt, ##__VA_ARGS__): \
+ up_assert(); \
+ } \
+ }
/**
* @brief Like ASSERT, but only if CONFIG_DEBUG is defined
*
@@ -186,6 +202,7 @@ extern char assert_info_str[CONFIG_STDIO_BUFFER_SIZE];
#else
+#define DEBUGASSERT_INFO(f, fmt, ...)
#define DEBUGASSERT(f)
#define DEBUGVERIFY(f) ((void)(f))
#define DEBUGPANIC()
|
Pass the correct speed on Spresense | @@ -155,7 +155,24 @@ static void _dcd_disconnect(FAR struct usbdevclass_driver_s *driver, FAR struct
{
(void) driver;
- tusb_speed_t speed = (dev->speed == 3) ? TUSB_SPEED_HIGH : TUSB_SPEED_FULL;
+ tusb_speed_t speed;
+
+ switch (dev->speed)
+ {
+ case USB_SPEED_LOW:
+ speed = TUSB_SPEED_LOW;
+ break;
+ case USB_SPEED_FULL:
+ speed = TUSB_SPEED_FULL;
+ break;
+ case USB_SPEED_HIGH:
+ speed = TUSB_SPEED_HIGH;
+ break;
+ default:
+ speed = TUSB_SPEED_HIGH;
+ break;
+ }
+
dcd_event_bus_reset(0, speed, true);
DEV_CONNECT(dev);
}
|
fpgasupdate: change apply time estimate
* fpgasupdate: change apply time estimate
Use the time taken to write to staging area and multiply by a multipler
(1.5) to estimate the time it will take to authenticate and apply the
udpate.
* fix typo in comment | @@ -74,8 +74,6 @@ IOCTL_IFPGA_SECURE_UPDATE_DATA_SENT = 0xb902
IOCTL_IFPGA_SECURE_UPDATE_CHECK_COMPLETE = 0xb903
IOCTL_IFPGA_SECURE_UPDATE_CANCEL = 0xb904
-APPLY_BPS = 41000.0
-
LOG = logging.getLogger()
LOG_IOCTL = logging.DEBUG - 1
LOG_STATE = logging.DEBUG - 2
@@ -437,7 +435,7 @@ def update_fw(fd_dev, infile):
LOG.info('writing to staging area')
- apply_time = payload_size/APPLY_BPS
+ begin = datetime.now()
with progress(bytes=payload_size, **progress_cfg) as prg:
while to_transfer:
buf = array.array('B')
@@ -471,7 +469,9 @@ def update_fw(fd_dev, infile):
else payload_size
prg.update(offset)
-
+ end = datetime.now()
+ # better to overestimate than under, use 1.5 as multiplier
+ apply_time = (end - begin).total_seconds() * 1.5
LOG.log(LOG_IOCTL, 'IOCTL ==> SECURE_UPDATE_DATA_SENT')
try:
fcntl.ioctl(fd_dev, IOCTL_IFPGA_SECURE_UPDATE_DATA_SENT)
|
Do not make pk_opaque_rsa_decrypt() depend on MBEDTLS_RSA_C | @@ -1602,7 +1602,6 @@ const mbedtls_pk_info_t mbedtls_pk_ecdsa_opaque_info = {
NULL, /* debug - could be done later, or even left NULL */
};
-#if defined(MBEDTLS_RSA_C)
static int pk_opaque_rsa_decrypt( void *ctx,
const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen, size_t osize,
@@ -1626,7 +1625,6 @@ static int pk_opaque_rsa_decrypt( void *ctx,
return 0;
}
-#endif
const mbedtls_pk_info_t mbedtls_pk_rsa_opaque_info = {
MBEDTLS_PK_OPAQUE,
@@ -1639,11 +1637,7 @@ const mbedtls_pk_info_t mbedtls_pk_rsa_opaque_info = {
NULL, /* restartable verify - not relevant */
NULL, /* restartable sign - not relevant */
#endif
-#if defined(MBEDTLS_RSA_C)
pk_opaque_rsa_decrypt,
-#else
- NULL, /* decrypt */
-#endif /* MBEDTLS_RSA_C */
NULL, /* encrypt - will be done later */
NULL, /* check_pair - could be done later or left NULL */
pk_opaque_alloc_wrap,
|
Add decrement of reference in python plugin for traceback only if need. | @@ -1215,7 +1215,7 @@ void py_loader_impl_error_print(loader_impl_py py_impl)
log_write("metacall", LOG_LEVEL_ERROR, error_format_str, type_str, value_str, traceback_str ? traceback_str : traceback_not_found);
- Py_DECREF(traceback_list);
+ Py_XDECREF(traceback_list);
Py_DECREF(separator);
Py_DECREF(traceback_str_obj);
|
linkaddr: Removed linkaddr_extended_t | @@ -70,11 +70,6 @@ typedef union {
#endif /* LINKADDR_SIZE == 2 */
} linkaddr_t;
-typedef union {
- uint8_t u8[8];
- uint16_t u16[4];
-} linkaddr_extended_t;
-
/**
* \brief Copy a link-layer address
* \param dest The destination
|
Turned non-implemented xdg_cb_popup_grab into warning | @@ -23,7 +23,7 @@ static void
xdg_cb_popup_grab(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial)
{
(void)client, (void)seat, (void)serial;
- STUB(resource);
+ STUBL(resource);
}
static const struct zxdg_popup_v6_interface zxdg_popup_v6_implementation = {
|
mangle: make getOffSet prefer lower values | /* Spend at least 3/4 of time on modifying the first 8kB of input */
static inline size_t mangle_getOffSet(run_t* run) {
- switch (util_rnd64() % 4) {
+ switch (util_rnd64() % 10) {
case 0:
- if (run->dynamicFileSz <= 128) {
+ if (run->dynamicFileSz <= 16) {
break;
}
- return util_rndGet(0, 128);
+ return util_rndGet(0, 16);
case 1:
+ if (run->dynamicFileSz <= 64) {
+ break;
+ }
+ return util_rndGet(0, 64);
+ case 2:
+ if (run->dynamicFileSz <= 256) {
+ break;
+ }
+ return util_rndGet(0, 256);
+ case 3:
if (run->dynamicFileSz <= 1024) {
break;
}
return util_rndGet(0, 1024);
- case 2:
+ case 4:
if (run->dynamicFileSz <= 8192) {
break;
}
|
Explicitly use mruby clang toolchain on macOS | @@ -244,7 +244,7 @@ set(MRUBY_CONFIG ${CMAKE_SOURCE_DIR}/mruby/tic_default.rb)
set(MRUBY_LIB ${MRUBY_DIR}/build/target/lib/libmruby.a)
if(MSVC)
set(MRUBY_TOOLCHAIN visualcpp)
-elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+elseif(APPLE OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(MRUBY_TOOLCHAIN clang)
else()
set(MRUBY_TOOLCHAIN gcc)
|
Rework sdb_itoa buffer management to silence GCC warning
make a clearer separation between temporary and allocated string buffer
eleminating gcc warning about function may return address of local variable | @@ -101,16 +101,16 @@ SDB_API const char *sdb_itoca(ut64 n) {
// assert (sizeof (s)>64)
// if s is null, the returned pointer must be freed!!
-SDB_API char *sdb_itoa(ut64 n, char *s, int base) {
+SDB_API char *sdb_itoa(ut64 n, char *os, int base) {
static const char* lookup = "0123456789abcdef";
- char tmpbuf[64], *os = NULL;
+ char tmpbuf[64], *s = NULL;
const int imax = 62;
int i = imax, copy_string = 1;
- if (s) {
- *s = 0;
- os = NULL;
+ if (os) {
+ *os = 0;
+ s = os;
} else {
- os = s = tmpbuf;
+ s = tmpbuf;
}
if (base < 0) {
copy_string = 0;
@@ -120,11 +120,11 @@ SDB_API char *sdb_itoa(ut64 n, char *s, int base) {
return NULL;
}
if (!n) {
- if (os) {
+ if (!os) {
return strdup ("0");
}
- strcpy (s, "0");
- return s;
+ strcpy (os, "0");
+ return os;
}
s[imax + 1] = '\0';
if (base <= 10) {
@@ -140,16 +140,16 @@ SDB_API char *sdb_itoa(ut64 n, char *s, int base) {
}
s[i--] = '0';
}
- if (os) {
+ if (!os) {
return strdup (s + i + 1);
}
if (copy_string) {
// unnecessary memmove in case we use the return value
// return s + i + 1;
- memmove (s, s + i + 1, strlen (s + i + 1) + 1);
- return s;
+ memmove (os, s + i + 1, strlen (s + i + 1) + 1);
+ return os;
}
- return s + i + 1;
+ return os + i + 1;
}
SDB_API ut64 sdb_atoi(const char *s) {
|
chip/ish/hwtimer.c: Format with clang-format
BRANCH=none
TEST=none | @@ -239,8 +239,7 @@ int __hw_clock_source_init64(uint64_t start_t)
/* Timer 1 - IRQ routing */
timer1_config &= ~HPET_Tn_INT_ROUTE_CNF_MASK;
- timer1_config |= (ISH_HPET_TIMER1_IRQ <<
- HPET_Tn_INT_ROUTE_CNF_SHIFT);
+ timer1_config |= (ISH_HPET_TIMER1_IRQ << HPET_Tn_INT_ROUTE_CNF_SHIFT);
/* Level triggered interrupt */
timer1_config |= HPET_Tn_INT_TYPE_CNF;
|
Address review comments:
every switch must have a default
revert formatting of unchanged lines | @@ -152,22 +152,28 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
if (stage != CONTROL_STAGE_SETUP ) return true;
if (request->bmRequestType_bit.type == TUSB_REQ_TYPE_VENDOR) {
- switch (request->bRequest) {
+ switch (request->bRequest)
+ {
case VENDOR_REQUEST_WEBUSB:
// match vendor request in BOS descriptor
// Get landing page url
return tud_control_xfer(rhport, request, (void*) &desc_url, desc_url.bLength);
case VENDOR_REQUEST_MICROSOFT:
- if ( request->wIndex == 7 ) {
+ if ( request->wIndex == 7 )
+ {
// Get Microsoft OS 2.0 compatible descriptor
uint16_t total_len;
memcpy(&total_len, desc_ms_os_20+8, 2);
return tud_control_xfer(rhport, request, (void*) desc_ms_os_20, total_len);
- } else {
+ }else
+ {
return false;
}
+
+ default:
+ return false;
}
} else if (
request->bmRequestType_bit.type == TUSB_REQ_TYPE_CLASS &&
@@ -182,7 +188,8 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
blink_interval_ms = BLINK_ALWAYS_ON;
tud_vendor_write_str("\r\nTinyUSB WebUSB device example\r\n");
- } else {
+ }else
+ {
blink_interval_ms = BLINK_MOUNTED;
}
|
MOVEHUB: make compilation of modmotor conditional to PBIO_OPT | @@ -75,10 +75,13 @@ SRC_S = \
# Pybricks modules
PYBRICKS_DRIVERS_SRC_C = $(addprefix ports/pybricks/,\
- extmod/modmotor.c \
extmod/pberror.c \
)
+ifneq (,$(findstring DPBIO_CONFIG_ENABLE_MOTORS,$(PBIO_OPT)))
+PYBRICKS_DRIVERS_SRC_C += $(addprefix ports/pybricks/extmod/modmotor.c)
+endif
+
PBIO_SRC_C = $(addprefix ports/pybricks/lib/pbio/,\
drv/move_hub/adc.c \
drv/move_hub/battery.c \
|
VERSION bump to version 0.7.45 | @@ -38,7 +38,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 7)
-set(LIBNETCONF2_MICRO_VERSION 44)
+set(LIBNETCONF2_MICRO_VERSION 45)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
README.md: Update installation command on Fedora | @@ -18,8 +18,8 @@ _libsdl2-ttf-dev_ on Ubuntu 13.10's case which is available in Ubuntu 14.04.
On __Ubuntu 14.04 and above__, type:
`apt install libsdl2{,-mixer,-image,-ttf,-gfx}-dev`
-On __Fedora 20 and above__, type:
-`yum install SDL2{,_mixer,_image,_ttf}-devel`
+On __Fedora 25 and above__, type:
+`yum install SDL2{,_mixer,_image,_ttf,_gfx}-devel`
On __Arch Linux__, type:
`pacman -S sdl2{,_mixer,_image,_ttf,_gfx}`
|
bumps http client request timeout to 5 minutes | @@ -934,7 +934,7 @@ _cttp_init_h2o()
{
h2o_timeout_t* tim_u = c3_malloc(sizeof(*tim_u));
- h2o_timeout_init(u3L, tim_u, 120 * 1000);
+ h2o_timeout_init(u3L, tim_u, 300 * 1000);
h2o_http1client_ctx_t* ctx_u = c3_calloc(sizeof(*ctx_u));
ctx_u->loop = u3L;
|
Update doc/usecases/record_elektra/UC_record_changes.md | - An active recording session exists
- **Main success scenario:**
- User makes a change to the key database, e.g. add key, delete key, modify key, modify meta
- - The old & new values for every chagned key and metakey are recorded.
+ - The old & new values for every changed key and metakey are recorded.
- **Alternative scenario:** -
- **Error scenario:** We log that the changes could not be recorded.
|
Upgrading to gcc 7 on Travis build worker | language: python
+matrix:
+ include:
+ # works on Precise and Trusty
+ - os: linux
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - g++-7
+ env:
+ - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
+
python:
- "3.6"
@@ -11,6 +24,7 @@ env:
before_install:
- sudo apt-get -qq update
+ - eval "${MATRIX_EVAL}"
install:
- sudo apt-get install -y libboost-test-dev
|
chat: fix unread marker spacing regression
fixes urbit/landscape#570 | @@ -84,7 +84,7 @@ export const UnreadMarker = React.forwardRef(
position='absolute'
ref={ref}
px={2}
- mt={2}
+ mt={0}
height={5}
justifyContent='center'
alignItems='center'
|
Catch invalid cpu count returned by CPU_COUNT_S
mips32 was seen to return zero here, driving nthreads to zero with subsequent fpe in blas_quickdivide | @@ -209,7 +209,8 @@ int ret;
size = CPU_ALLOC_SIZE(nums);
ret = sched_getaffinity(0,size,cpusetp);
if (ret!=0) return nums;
- nums = CPU_COUNT_S(size,cpusetp);
+ ret = CPU_COUNT_S(size,cpusetp);
+ if (ret > 0 && ret < nums) nums = ret;
CPU_FREE(cpusetp);
return nums;
#endif
|
Fix leaking file descriptors
Another issue found by static code analysers | @@ -67,23 +67,25 @@ int daemonize(int nochdir, int noclose)
if (noclose == 0 && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
if(dup2(fd, STDIN_FILENO) < 0) {
perror("dup2 stdin");
- return (-1);
+ goto err_cleanup;
}
if(dup2(fd, STDOUT_FILENO) < 0) {
perror("dup2 stdout");
- return (-1);
+ goto err_cleanup;
}
if(dup2(fd, STDERR_FILENO) < 0) {
perror("dup2 stderr");
- return (-1);
+ goto err_cleanup;
}
- if (fd > STDERR_FILENO) {
if(close(fd) < 0) {
perror("close");
return (-1);
}
}
- }
return (0);
+
+ err_cleanup:
+ close(fd);
+ return (-1);
}
|
Clean up crashing list fix | @@ -3735,10 +3735,8 @@ public:
}
else
{
- size_t off = __right_->size();
- if (__size_ > 0)
- off += 2;
- const_cast<long&>(__cached_size_) = __left_->size() + off;
+ const_cast<long&>(__cached_size_) = (
+ (__size_ ? 2 : 0) + __left_->size() + __right_->size());
}
}
return __cached_size_;
|
rm writable from UniformBlock; | @@ -80,7 +80,6 @@ struct ShaderBlock {
typedef struct {
int index;
int binding;
- bool writable;
ShaderBlock* source;
vec_uniform_t uniforms;
} UniformBlock;
@@ -1270,7 +1269,7 @@ Shader* lovrShaderCreate(const char* vertexSource, const char* fragmentSource) {
vec_init(uniformBlocks);
vec_reserve(uniformBlocks, blockCount);
for (int i = 0; i < blockCount; i++) {
- UniformBlock block = { .index = i, .binding = i + 1, .writable = false, .source = NULL };
+ UniformBlock block = { .index = i, .binding = i, .source = NULL };
glUniformBlockBinding(program, block.index, block.binding);
vec_init(&block.uniforms);
@@ -1291,7 +1290,7 @@ Shader* lovrShaderCreate(const char* vertexSource, const char* fragmentSource) {
glGetProgramInterfaceiv(program, GL_SHADER_STORAGE_BLOCK, GL_ACTIVE_RESOURCES, &storageCount);
vec_reserve(storageBlocks, storageCount);
for (int i = 0; i < storageCount; i++) {
- UniformBlock block = { .index = i, .binding = i + 1, .writable = true, .source = NULL };
+ UniformBlock block = { .index = i, .binding = i, .source = NULL };
glShaderStorageBlockBinding(program, block.index, block.binding);
vec_init(&block.uniforms);
|
dynamic framecount | @@ -3531,9 +3531,14 @@ tagtoright(const Arg *arg) {
void
tile(Monitor *m)
{
- unsigned int i, n, h, mw, my, ty;
+ unsigned int i, n, h, mw, my, ty, framecount;
Client *c;
+ if (clientcount() > 5)
+ framecount = 5;
+ else
+ framecount = 10;
+
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
if (n == 0)
return;
@@ -3545,12 +3550,12 @@ tile(Monitor *m)
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if (i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
- animateclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 7, 0);
+ animateclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), framecount, 0);
if (my + HEIGHT(c) < m->wh)
my += HEIGHT(c);
} else {
h = (m->wh - ty) / (n - i);
- animateclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 7, 0);
+ animateclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), framecount, 0);
if (ty + HEIGHT(c) < m->wh)
ty += HEIGHT(c);
}
|
naive: try updating predicted state on confirmed L2 tx | :: unexpected tx failures here. would that be useful? probably not?
:: ~? !forced [dap.bowl %aggregated-tx-failed-anyway err.diff]
%failed
+ :: because we update the predicted state upon receiving
+ :: a new L2 tx via the rpc-api, this will only succeed when
+ :: we hear about a L2 tx that hasn't been submitted by us
::
+ =^ * nas (try-apply nas | raw-tx.diff)
[~ state]
::
--
|
Use crane to manage dockerhub tags in update_latest.yml workflow. | @@ -46,24 +46,17 @@ jobs:
runs-on: ubuntu-latest
needs: update-cdn-latest
steps:
- - name: Login to Container Registry
- uses: docker/login-action@v2
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: scopeci
password: ${{ secrets.SCOPECI_TOKEN }}
- - name: Pull the Image
- run: docker pull cribl/scope:${{ github.event.inputs.version }}
-
- name: Update the Latest Tag
- run: docker tag cribl/scope:${{ github.event.inputs.version }} cribl/scope:latest
-
- - name: Push the Tag
- run: docker push cribl/scope:latest
+ uses: imjasonh/[email protected]
+ run: |
+ crane digest cribl/scope:${{ github.event.inputs.version }}
+ crane tag cribl/scope:${{ github.event.inputs.version }} latest
+ crane digest cribl/scope:latest
+ crane manifest cribl/scope:${{ github.event.inputs.version }} | jq .
+ crane manifest cribl/scope:latest | jq .
|
Trying to track down memory leak in evolve. Adding print statements. | @@ -93,6 +93,8 @@ double fdGetTimeStep(BODY *body,CONTROL *control,SYSTEM *system,UPDATE *update,f
for (iVar=0;iVar<update[iBody].iNumVars;iVar++) {
// The parameter does not require a derivative, but is calculated explicitly as a function of age.
+ printf("%d %d\n",iBody,iVar);
+ fflush(stdout);
if (update[iBody].iaType[iVar][0] == 0) {
dVarNow = *update[iBody].pdVar[iVar];
for (iEqn=0;iEqn<update[iBody].iNumEqns[iVar];iEqn++) {
|
CMake: change hardcoded library name to just remove the lib prefix instead. | @@ -124,11 +124,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE TCOD_IGNORE_DEPRECATED)
include(sources.cmake)
-if(MSVC)
- set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_NAME libtcod)
-else()
- set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_NAME tcod)
-endif()
+# Remove the "lib" prefix to prevent a library name like "liblibtcod".
+set_property(TARGET ${PROJECT_NAME} PROPERTY PREFIX "")
if(MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
|
Test for JPEG | @@ -69,13 +69,10 @@ GRIB2_INPUTS="
${data_dir}/test_file.grib2
${data_dir}/sample.grib2"
-# Check HAVE_JPEG is defined and is equal to 1
-if [ "x$HAVE_JPEG" != x ]; then
if [ $HAVE_JPEG -eq 1 ]; then
- # Include files which have messages with grid_jpeg packing
+ echo "Adding extra files (HAVE_JPEG=1)"
GRIB2_INPUTS="${data_dir}/jpeg.grib2 ${data_dir}/reduced_gaussian_surface_jpeg.grib2 "$GRIB2_INPUTS
fi
-fi
#GRIB2_INPUTS=$GRIB2_INPUTS" ${data_dir}/ccsds.grib2 "
for gf in $GRIB1_INPUTS $GRIB2_INPUTS; do
|
fixed endian.h on IOS | #include <unistd.h>
#include <limits.h>
#include <time.h>
-#include <endian.h>
#include <ctype.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <libgen.h>
#else
#include <stdio_ext.h>
+#include <endian.h>
#endif
#include <openssl/sha.h>
#include <openssl/hmac.h>
|
build: Bump c++ standard to c++20 | @@ -45,7 +45,7 @@ if not headers_only
c_compiler = meson.get_compiler('c')
add_project_arguments('-nostdinc', '-fno-builtin', language: ['c', 'cpp'])
- add_project_arguments('-std=c++17', language: 'cpp')
+ add_project_arguments('-std=c++20', language: 'cpp')
add_project_arguments('-fno-rtti', '-fno-exceptions', language: 'cpp')
add_project_link_arguments('-nostdlib', language: ['c', 'cpp'])
|
graph api npm: updated endpoints | @@ -383,7 +383,8 @@ export const getNewest = (
index = ''
): Scry => ({
app: 'graph-store',
- path: `/newest/${ship}/${name}/${count}${encodeIndex(index)}`
+ path: `/graph/${ship}/${name}/node/siblings` +
+ `/newest/lone/${count}${encodeIndex(index)}`
});
/**
@@ -402,7 +403,7 @@ export const getOlderSiblings = (
index: string
): Scry => ({
app: 'graph-store',
- path: `/node-siblings/older/${ship}/${name}/${count}${encodeIndex(index)}`
+ path: `/graph/${ship}/${name}/node/siblings/older/lone/${count}${encodeIndex(index)}`
});
/**
@@ -421,7 +422,7 @@ export const getYoungerSiblings = (
index: string
): Scry => ({
app: 'graph-store',
- path: `/node-siblings/younger/${ship}/${name}/${count}${encodeIndex(index)}`
+ path: `/graph/${ship}/${name}/node/siblings/newer/lone/${count}${encodeIndex(index)}`
});
/**
@@ -433,7 +434,7 @@ export const getYoungerSiblings = (
*/
export const getShallowChildren = (ship: string, name: string, index = '') => ({
app: 'graph-store',
- path: `/shallow-children/${ship}/${name}${encodeIndex(index)}`
+ path: `/graph/${ship}/${name}/node/children/lone/~/~/${encodeIndex(index)}`
});
@@ -454,7 +455,9 @@ export const getDeepOlderThan = (
start?: string
) => ({
app: 'graph-store',
- path: `/deep-nodes-older-than/${ship}/${name}/${count}/${start ? decToUd(start) : 'null'}`
+ path: `/graph/${ship}/${name}/node/siblings` +
+ `/${start ? 'older' : 'oldest'}` +
+ `/kith/${count}/${start ? decToUd(start) : '~'}`
});
@@ -472,7 +475,7 @@ export const getFirstborn = (
index: string
): Scry => ({
app: 'graph-store',
- path: `/firstborn/${ship}/${name}${encodeIndex(index)}`
+ path: `/graph/${ship}/${name}/node/firstborn${encodeIndex(index)}`
});
/**
@@ -489,7 +492,7 @@ export const getNode = (
index: string
): Scry => ({
app: 'graph-store',
- path: `/node/${ship}/${name}${encodeIndex(index)}`
+ path: `/graph/${ship}/${name}/node/index/kith${encodeIndex(index)}`
});
/**
|
oc_core_res: avoid use of variable length array | @@ -128,8 +128,14 @@ finalize_payload(uint8_t *buffer, oc_string_t *payload)
if (size != -1) {
oc_alloc_string(payload, size);
memcpy(oc_cast(*payload, uint8_t), buffer, size);
+#ifdef OC_DYNAMIC_ALLOCATION
+ free(buffer);
+#endif /* OC_DYNAMIC_ALLOCATION */
return 1;
}
+#ifdef OC_DYNAMIC_ALLOCATION
+ free(buffer);
+#endif /* OC_DYNAMIC_ALLOCATION */
return -1;
}
@@ -183,7 +189,14 @@ oc_core_add_new_device(const char *uri, const char *rt, const char *name,
}
/* Encoding device resource payload */
+#ifdef OC_DYNAMIC_ALLOCATION
+ uint8_t *buffer = malloc(OC_MAX_APP_DATA_SIZE);
+ if (!buffer) {
+ oc_abort("Insufficient memory");
+ }
+#else /* OC_DYNAMIC_ALLOCATION */
uint8_t buffer[OC_MAX_APP_DATA_SIZE];
+#endif /* !OC_DYNAMIC_ALLOCATION */
oc_rep_new(buffer, OC_MAX_APP_DATA_SIZE);
oc_rep_start_root_object();
@@ -248,7 +261,14 @@ oc_core_init_platform(const char *mfg_name, oc_core_init_platform_cb_t init_cb,
oc_core_platform_handler, 0, 0, 0, 1, "oic.wk.p");
/* Encoding platform resource payload */
+#ifdef OC_DYNAMIC_ALLOCATION
+ uint8_t *buffer = malloc(OC_MAX_APP_DATA_SIZE);
+ if (!buffer) {
+ oc_abort("Insufficient memory");
+ }
+#else /* OC_DYNAMIC_ALLOCATION */
uint8_t buffer[OC_MAX_APP_DATA_SIZE];
+#endif /* !OC_DYNAMIC_ALLOCATION */
oc_rep_new(buffer, OC_MAX_APP_DATA_SIZE);
oc_rep_start_root_object();
oc_rep_set_string_array(root, rt, core_resources[OCF_P].types);
|
CMSIS-DSP: Corrected build problem with arm_correlate_f32. | */
#include "arm_math.h"
-#include "arm_vec_filtering.h"
/**
@ingroup groupFilters
#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE)
#include "arm_helium_utils.h"
+#include "arm_vec_filtering.h"
void arm_correlate_f32(
|
bignum_common: Adjusted `format_arg` to always size input according to modulo. | @@ -297,10 +297,7 @@ class ModOperationCommon(OperationCommon):
return self.format_arg(self.val_n)
def format_arg(self, val: str) -> str:
- if self.input_style == "variable":
- return val.zfill(len(hex(self.int_n)) - 2)
- else:
- return super().format_arg(val)
+ return super().format_arg(val).zfill(self.hex_digits)
def arguments(self) -> List[str]:
return [quote_str(self.arg_n)] + super().arguments()
|
decoding net: don't return vpn/ppn use the addresses instead | @@ -416,6 +416,9 @@ mapping_confs(SrcReg, DstName, Confs) :-
SrcReg = region(SrcId, block(SrcBase, SrcLimit)),
DstName = name(DstId, DstBase),
configurable(SrcId, Bits, DstId),
+ node_enum(SrcId, SrcEnum),
+ Confs = [c(SrcEnum, SrcBase, DstBase)].
+ /*
BlockSize is 2^Bits,
SrcSize is SrcLimit - SrcBase + 1,
NumBlocksEnd is SrcSize // BlockSize - 1,
@@ -428,7 +431,7 @@ mapping_confs(SrcReg, DstName, Confs) :-
In is BlockSize * VPN,
Out is BlockSize * PPN,
node_enum(SrcId, SrcEnum)
- ).
+ ). */
write_conf_update(state(M0,_,_), state(M1, _, _)) :-
subtract(M1, M0, MDelta),
|
[genesis] add version as a settable field | @@ -63,7 +63,7 @@ func (e errCidCodec) Error() string {
// ChainID represents the identity of the chain.
type ChainID struct {
- Version int32 `json:"-"`
+ Version int32 `json:"version"`
PublicNet bool `json:"public"`
MainNet bool `json:"mainnet"`
Magic string `json:"magic"`
|
Disable warnings in hcc until the upstream repo fixes the warnings properly | +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 06e3e5b..9253fd6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ include(GNUInstallDirs)
+ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/scripts/cmake")
+ MESSAGE("Module path: ${CMAKE_MODULE_PATH}")
+
++add_compile_options(-w)
++
+ # set as release build by default
+ IF (NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Release Debug" FORCE)
diff --git a/include/hc.hpp b/include/hc.hpp
index dea6141d..c8673201 100644
--- a/include/hc.hpp
|
Fix typo.
This commit aims to change `To verify what exactly what is compiled in statically` to `To verify exactly what is compiled statically` as the latter is clearer and easier to understand. | @@ -112,7 +112,7 @@ at run time based on Apache configuration files.
If modules have been statically compiled into Apache, usually it would be
evident by what 'configure' arguments have been used when Apache was built.
-To verify what exactly what is compiled in statically, you can use the ``-l``
+To verify exactly what is compiled statically, you can use the ``-l``
option to the Apache executable.
On MacOS X, for the operating system supplied Apache the output from
|
.travis(.yml): make cppcheck more quiet | @@ -50,7 +50,7 @@ script:
- echo $CC
- echo $CXX
- ${EXTRA} cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
- - if [ "$CHECK" == "cppcheck" ]; then cppcheck --project=compile_commands.json; fi
+ - if [ "$CHECK" == "cppcheck" ]; then cppcheck --project=compile_commands.json --quiet; fi
- ${EXTRA} make
- ulimit -c unlimited -S
- ./picoquic_ct -n && RESULT=$?
|
Complete quotes, parenthesis and brackets on macOS app | @@ -275,6 +275,33 @@ class EditorViewController: NSViewController, SyntaxTextViewDelegate, NSTextView
if replacementString == "\t" {
textView.insertText(" ", replacementRange: affectedCharRange)
return false
+ } else if replacementString == "(" {
+
+ defer {
+ let range = textView.selectedRange()
+ textView.insertText(")", replacementRange: range)
+ textView.setSelectedRange(range)
+ }
+
+ return true
+ } else if replacementString == "\"" {
+
+ defer {
+ let range = textView.selectedRange()
+ textView.replaceCharacters(in: range, with: "\"")
+ textView.setSelectedRange(range)
+ }
+
+ return true
+ } else if replacementString == "[" {
+
+ defer {
+ let range = textView.selectedRange()
+ textView.insertText("]", replacementRange: range)
+ textView.setSelectedRange(range)
+ }
+
+ return true
} else {
return true
}
|
admin/meta-packages: include 2 additional packages in ohpc-compute for udpate
mpich builds | @@ -87,11 +87,15 @@ Requires: python3
Requires: cairo-devel
Requires: libpciaccess
Requires: libseccomp
+Requires: librdmacm
+Requires: libpsm2
%endif
%if 0%{?suse_version}
Requires: libcairo2
Requires: libpciaccess0
Requires: libatomic1
+Requires: librdmacm1
+Requires: libpsm2-2
%endif
%description -n %{PROJ_NAME}-base-compute
Collection of compute node base packages
|
Add more floating point tests, and [commented out] failing cases | @@ -71,6 +71,11 @@ add_ops:
.float inf, -inf, nan
.float nan, 1.0, nan
.float 1.0, nan, nan
+ .float nan, nan, nan
+ .long 0x00800000, 0x80800000, 0 # Add underflow 2e-38 + -2e-38 = 0
+
+ # Failing cases
+ #.long 0x7f7fffff, 0x7f7fffff, 0x7f800000 # Issue #56: Add overflow: 1e+38 + 1e+38 = inf
add_ops_end:
sub_ops:
@@ -94,13 +99,16 @@ sub_ops:
.float 1.0, -inf, inf
.float 1.0, inf, -inf
.float inf, inf, nan
- .float nan, -1.0, nan
+ .float nan, 1.0, nan
.float 1.0, nan, nan
+ .float nan, nan, nan
sub_ops_end:
mul_ops:
.float 0.0, 4.0, 0.0 # Zero identity
.float 4.0, 0.0, 0.0
+ .float 4.0, -0.0, -0.0 # Same w/ negative zero
+ .float -4.0, 0.0, -0.0
.float 1.0, 4.0, 4.0 # One identity
.float 4.0, 1.0, 4.0
.float 2.5, 12.0, 30.0
@@ -120,5 +128,8 @@ mul_ops:
.float 1, inf, inf
.float nan, 1, nan
.float 1, nan, nan
-mul_ops_end:
+ .long 0x7f7fffff, 0x40800000, 0x7f800000 # Mul overflow: 1e+38 * 4 = inf
+ # Failing cases
+ #.long 0x00800000, 0x2d000000, 0x0 # Issue #57: Mul underflow: 1e-38 * 1e-12 = 0
+mul_ops_end:
|
hw/drivers/lp5523: Fix potential stack corruption
Make sure caller does not try to write more registers at once than
supported by driver. | @@ -137,6 +137,10 @@ lp5523_set_n_regs(struct led_itf *itf, enum lp5523_registers addr,
.buffer = payload,
};
+ if (len >= LP5523_MAX_PAYLOAD) {
+ return -1;
+ }
+
payload[0] = addr;
memcpy(&payload[1], vals, len);
|
oglGraph: fix size with Retina display
example: openGL graphs in the FFT window | @@ -176,8 +176,8 @@ void OpenGLGraph::Resize(int w, int h)
{
if(w <= 0 || h <=0 )
return;
- settings.windowWidth = w;
- settings.windowHeight = h;
+ settings.windowWidth = w * GetContentScaleFactor();
+ settings.windowHeight = h * GetContentScaleFactor();
settings.dataViewHeight = settings.windowHeight-settings.marginTop-settings.marginBottom;
if(settings.dataViewHeight <= 0)
settings.dataViewHeight = 1;
|
documented in correlation | * - CCL_CORR_BESSEL : direct integration over the Bessel function
* - CCL_CORR_LGNDRE : brute-force sum over legendre polynomials
* @param corr_type : type of correlation function. Choose between:
- * - CCL_CORR_GG : galaxy-galaxy
- * - CCL_CORR_GL : galaxy-shear
- * - CCL_CORR_LP : shear-shear (xi+)
- * - CCL_CORR_LM : shear-shear (xi-)
+ * - CCL_CORR_GG : spin0-spin0
+ * - CCL_CORR_GL : spin0-spin2
+ * - CCL_CORR_LP : spin2-spin2 (xi+)
+ * - CCL_CORR_LM : spin2-spin2 (xi-)
+ * Currently supported spin-0 fields are number counts and CMB lensing. The only spin-2 is currently shear.
*/
void ccl_correlation(ccl_cosmology *cosmo,
int n_ell,double *ell,double *cls,
|
apps/examples/lvgldemo: Remove references to CONFIG_EXAMPLES_LGVLDEMO_ARCHINIT (which was never defined anyway) and to all references to board control. The board bringup logic must register the touchscreen driver. BOARDIOC_TSCTEST_SETUP is deprecated. | #include <nuttx/config.h>
#include <sys/types.h>
-#include <sys/boardctl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -93,22 +92,6 @@ int tp_init(void)
int ret;
int errval = 0;
-#ifdef CONFIG_EXAMPLES_LGVLDEMO_ARCHINIT
- /* Initialization of the touchscreen hardware is performed by logic
- * external to this test.
- */
-
- printf("tp_init: Initializing external touchscreen device\n");
-
- ret = boardctl(BOARDIOC_TSCTEST_SETUP, CONFIG_EXAMPLES_LGVLDEMO_MINOR);
- if (ret != OK)
- {
- printf("tp_init: board_tsc_setup failed: %d\n", errno);
- errval = 1;
- goto errout;
- }
-#endif
-
/* Open the touchscreen device for reading */
printf("tp_init: Opening %s\n", CONFIG_EXAMPLES_LGVLDEMO_DEVPATH);
@@ -118,17 +101,12 @@ int tp_init(void)
printf("tp_init: open %s failed: %d\n",
CONFIG_EXAMPLES_LGVLDEMO_DEVPATH, errno);
errval = 2;
- goto errout_with_tc;
+ goto errout;
}
return OK;
-errout_with_tc:
-#ifdef CONFIG_EXAMPLES_LGVLDEMO_ARCHINIT
- boardctl(BOARDIOC_TSCTEST_TEARDOWN, 0);
-
errout:
-#endif
printf("Terminating!\n");
fflush(stdout);
return errval;
|
Remove connected check for write flushing | @@ -165,11 +165,7 @@ uint32_t tud_cdc_n_write_flush (uint8_t itf)
TU_VERIFY( !usbd_edpt_busy(TUD_OPT_RHPORT, p_cdc->ep_in), 0 );
uint16_t count = tu_fifo_read_n(&p_cdc->tx_ff, p_cdc->epin_buf, sizeof(p_cdc->epin_buf));
- if ( count )
- {
- TU_VERIFY( tud_cdc_n_connected(itf), 0 ); // fifo is empty if not connected
- TU_ASSERT( usbd_edpt_xfer(TUD_OPT_RHPORT, p_cdc->ep_in, p_cdc->epin_buf, count), 0 );
- }
+ if ( count ) TU_ASSERT( usbd_edpt_xfer(TUD_OPT_RHPORT, p_cdc->ep_in, p_cdc->epin_buf, count), 0 );
return count;
}
|
fix(docs) commit to meta repo as lvgl-bot instead of actual commit author | @@ -71,6 +71,8 @@ jobs:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: out_html # The folder the action should deploy.
TARGET_FOLDER: ${{ steps.version.outputs.VERSION_NAME }}
+ GIT_CONFIG_NAME: lvgl-bot
+ GIT_CONFIG_EMAIL: [email protected]
PRESERVE: true
SINGLE_COMMIT: true
- name: Deploy to master
@@ -83,5 +85,7 @@ jobs:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: out_html # The folder the action should deploy.
TARGET_FOLDER: master
+ GIT_CONFIG_NAME: lvgl-bot
+ GIT_CONFIG_EMAIL: [email protected]
PRESERVE: true
SINGLE_COMMIT: true
|
using puts instead of printf | @@ -200,7 +200,7 @@ void NAR_AddInputNarsese(char *narsese_sentence)
// dont add the input if it is an eternal goal
if(punctuation == '!' && !isEvent)
{
- printf("Eternal goals are not supported, input is ignored!\n");
+ puts("Warning: Eternal goals are not supported, input is ignored!\n");
}
else
{
|
drawcia: Add Batteries CFET mask & val field
This commit add the charge FET (CFET) field for OCPC.
BRANCH=none
TEST=On Drawcia. Cutoff battery and verify that CFET disable status
is reflected after attached charger. | @@ -45,6 +45,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -74,6 +76,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -103,6 +107,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -132,6 +138,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -161,6 +169,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -190,6 +200,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -219,6 +231,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -248,6 +262,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
@@ -277,6 +293,8 @@ const struct board_batt_params board_battery_info[] = {
.reg_addr = 0x0,
.reg_mask = 0x0006,
.disconnect_val = 0x0,
+ .cfet_mask = 0x0004,
+ .cfet_off_val = 0x0,
},
},
.batt_info = {
|
changed AP_CPPFLAGS to AM_CPPFLAGS in PyImathNumpy/Makefile.am.
What this a typo? The automake-generated Makefiles expect 'AM', which
was leading to a failure to find PyImath.h. | @@ -13,7 +13,7 @@ imathnumpymodule_la_LIBADD = $(top_builddir)/PyImath/libPyImath.la @BOOST_PYTHO
noinst_HEADERS =
-AP_CPPFLAGS = @ILMBASE_CXXFLAGS@ \
+AM_CPPFLAGS = @ILMBASE_CXXFLAGS@ \
@NUMPY_CXXFLAGS@ \
-I$(top_srcdir)/PyImath \
-I$(top_builddir) \
|
ELM327: Fixed LIN double init issue. | @@ -355,12 +355,14 @@ uint16_t ICACHE_FLASH_ATTR elm_LIN_read_into_ringbuff() {
if(lin_ringbuff_start == lin_ringbuff_end) lin_ringbuff_start++;
}
+ #ifdef ELM_DEBUG
if(bytelen){
os_printf(" RB Data (%d %d %d): ", lin_ringbuff_start, lin_ringbuff_end, lin_ringbuff_len);
for(int i = 0; i < sizeof(lin_ringbuff); i++)
os_printf("%02x ", lin_ringbuff[i]);
os_printf("\n");
}
+ #endif
return bytelen;
}
@@ -585,7 +587,8 @@ void ICACHE_FLASH_ATTR elm_LINFast_timer_cb(void *arg){
for(int pass = 0; pass < 16 && loopcount; pass++){
elm_LIN_read_into_ringbuff();
- if(lin_ringbuff_len > 0){
+ while(lin_ringbuff_len > 0){
+ //if(lin_ringbuff_len > 0){
if(lin_ringbuff_get(0) & 0x80 != 0x80){
os_printf("Resetting LIN bus due to bad first byte.\n");
loopcount = 0;
@@ -605,6 +608,7 @@ void ICACHE_FLASH_ATTR elm_LINFast_timer_cb(void *arg){
os_printf("Processing LIN MSG. BuffLen %d; expect %d\n", lin_ringbuff_len, newmsg_len);
#endif
got_msg_this_run = true;
+ loopcount = LOOPCOUNT_FULL;
if(!is_auto_detecting){
if(elm_mode_additional_headers){
@@ -616,6 +620,8 @@ void ICACHE_FLASH_ATTR elm_LINFast_timer_cb(void *arg){
}
lin_ringbuff_consume(newmsg_len);
+ } else {
+ break; //Stop consuming data if there is not enough data for the next msg.
}
}
}
@@ -727,8 +733,9 @@ void ICACHE_FLASH_ATTR elm_LINFast_businit_timer_cb(void *arg){
} else {
os_printf("LIN success. Silent because in autodetect.\n");
elm_autodetect_cb(true);
+ // TODO: Since bus init is good, is it ok to skip sending the '0100' msg?
}
-
+ return;
}
}
}
|
Ensure we simply update the UI once after tailing multiple files. | @@ -806,8 +806,8 @@ verify_inode (FILE * fp, GLog * glog) {
/* Process appended log data
*
- * If nothing changed, 1 is returned.
- * If log file changed, 0 is returned. */
+ * If nothing changed, 0 is returned.
+ * If log file changed, 1 is returned. */
static int
perform_tail_follow (GLog * glog) {
FILE *fp = NULL;
@@ -819,7 +819,7 @@ perform_tail_follow (GLog * glog) {
parse_tail_follow (glog, glog->pipe);
/* did we read something from the pipe? */
if (0 == glog->bytes)
- return 1;
+ return 0;
glog->length += glog->bytes;
goto out;
@@ -831,7 +831,7 @@ perform_tail_follow (GLog * glog) {
/* ###NOTE: This assumes the log file being read can be of smaller size, e.g.,
* rotated/truncated file or larger when data is appended */
if (length == glog->length)
- return 1;
+ return 0;
if (!(fp = fopen (glog->filename, "r")))
FATAL ("Unable to read the specified log file '%s'. %s", glog->filename, strerror (errno));
@@ -866,7 +866,7 @@ perform_tail_follow (GLog * glog) {
out:
- return 0;
+ return 1;
}
/* Loop over and perform a follow for the given logs */
@@ -882,10 +882,10 @@ tail_loop_html (Logs * logs) {
if (conf.stop_processing)
break;
- for (i = 0; i < logs->size; ++i)
- ret = perform_tail_follow (&logs->glog[i]); /* 0.2 secs */
+ for (i = 0, ret = 0; i < logs->size; ++i)
+ ret |= perform_tail_follow (&logs->glog[i]); /* 0.2 secs */
- if (0 == ret)
+ if (1 == ret)
tail_html ();
if (nanosleep (&refresh, NULL) == -1 && errno != EINTR)
|
Remove 1.3 to 2.0 helpers: Python port of | @@ -88,8 +88,7 @@ class NameCheck(object):
self.log = None
self.check_repo_path()
self.return_code = 0
- self.excluded_files = ["compat-1.3.h"]
- self.typo_check_pattern = r"XXX|__|_$|^MBEDTLS_.*CONFIG_FILE$"
+ self.excluded_files = ["bn_mul"]
def set_return_code(self, return_code):
if return_code > self.return_code:
|
efuse/esp32: Fix get_coding_scheme() when CONFIG_SECURE_FLASH_ENC_ENABLED and LOG_LEVEL is Debug
Closes: | @@ -64,6 +64,6 @@ esp_efuse_coding_scheme_t esp_efuse_get_coding_scheme(esp_efuse_block_t blk)
scheme = EFUSE_CODING_SCHEME_REPEAT;
}
}
- ESP_LOGD(TAG, "coding scheme %d", scheme);
+ ESP_EARLY_LOGD(TAG, "coding scheme %d", scheme);
return scheme;
}
|
worker printfs | @@ -374,6 +374,21 @@ _worker_send_slog(u3_noun hod)
_worker_send(u3nt(c3__slog, u3i_chubs(1, &u3V.sen_d), hod));
}
+/* _worker_send_tang(): send list of hoon tanks as hint outputs.
+*/
+static void
+_worker_send_tang(c3_y pri_y, u3_noun tan)
+{
+ u3_noun i_tan, t_tan;
+ while ( u3_nul != tan ) {
+ i_tan = u3k(u3h(tan));
+ t_tan = u3k(u3t(tan));
+ u3z(tan);
+ _worker_send_slog(u3nc(pri_y, i_tan));
+ tan = t_tan;
+ }
+}
+
/* _worker_lame(): event failed, replace with error event.
*/
static void
@@ -393,6 +408,7 @@ _worker_lame(c3_d evt_d, u3_noun now, u3_noun ovo, u3_noun why, u3_noun tan)
// with a crypto failure, just drop the packet.
//
if ( (c3__hear == tag) && (c3__exit == why) ) {
+ _worker_send_tang(1, u3k(tan));
rep = u3nt(u3k(wir), c3__hole, u3k(cad));
}
// failed event notifications (%crud) are replaced with
@@ -404,6 +420,7 @@ _worker_lame(c3_d evt_d, u3_noun now, u3_noun ovo, u3_noun why, u3_noun tan)
else if ( c3__crud == tag ) {
u3_noun lef = u3nc(c3__leaf, u3i_tape("crude crashed!"));
u3_noun nat = u3kb_weld(u3k(u3t(cad)), u3nc(lef, u3k(tan)));
+ _worker_send_tang(1, u3k(nat));
rep = u3nc(u3nt(u3_blip, c3__arvo, u3_nul),
u3nt(c3__warn, u3k(u3h(cad)), nat));
}
@@ -423,6 +440,7 @@ _worker_lame(c3_d evt_d, u3_noun now, u3_noun ovo, u3_noun why, u3_noun tan)
u3_noun lef = u3nc(c3__leaf, u3kb_weld(u3i_tape("bail: "),
u3qc_rip(3, why)));
u3_noun nat = u3kb_weld(u3k(tan), u3nc(lef, u3_nul));
+ _worker_send_tang(1, u3k(nat));
rep = u3nc(u3k(wir), u3nt(c3__crud, u3k(tag), nat));
}
|
BugID:17922164: Fix FM33A04xx startup process | @@ -25,7 +25,7 @@ static kinit_t kinit = {0, NULL, 0};
static void sys_init(void)
{
/* user code start*/
-
+ board_init();
/*insert driver to enable irq for example: starting to run tick time.
drivers to trigger irq is forbidden before aos_start, which will start core schedule.
*/
@@ -46,8 +46,6 @@ int main(void)
Put them in sys_init which will be called after aos_start.
Irq for task schedule should be enabled here, such as PendSV for cortex-M4.
*/
- board_init(); //including aos_heap_set(); flash_partition_init();
-
/*kernel init, malloc can use after this!*/
krhino_init();
|
psychonauts update
fixed | @@ -137,6 +137,8 @@ DWORD WINAPI Init(LPVOID bDelay)
static auto dw_61EADD = hook::get_pattern("8B 8D 14 FF FF FF 8B 51 0C 8B 85 14", 0); // 0x0061EADD
static auto dw_61EAF6 = hook::get_pattern("C7 45 D8 00 00 00 00 8B 0D ? ? ? ? 8B 91 8C", 0); // 0x0061EAF6
static auto dw_61F2FE = hook::get_pattern("8B 85 14 FF FF FF 8B 08 E8 ? ? ? ? 8B E5 5D C3", 13); // 0x0061F2FE
+ static auto dw_673413 = hook::get_pattern("D9 41 08 D9 1C 24 8B 4D FC E8 ? ? ? ? 8B E5 5D C3", 14); // 0x00673413
+ static auto dw_61F19D = hook::get_pattern("8B 95 14 FF FF FF 8B 4A 28 E8", 0); // 0x0061F19D
pattern = hook::pattern("BE ? ? ? ? 8D BC 24 00 01 00 00 F3 A5 83 7D 20 00");
injector::WriteMemory(pattern.get_first(1), &flt_7933E0, true); //0x47CC71 + 1
@@ -178,7 +180,7 @@ DWORD WINAPI Init(LPVOID bDelay)
{
if (bWidescreenHud)
{
- static auto idx = 0;
+ static auto idx = 0; // seems like 4 in debug build and 3 in release
static void* stack[6];
CaptureStackBackTrace(0, 6, stack, NULL);
@@ -206,7 +208,7 @@ DWORD WINAPI Init(LPVOID bDelay)
}
else
{
- if (stack[idx] == dw_61EAC4 || stack[idx] == dw_61EAF6 || stack[idx] == dw_61EADD)
+ if (stack[idx] == dw_61EAC4 || stack[idx] == dw_61EAF6 || stack[idx] == dw_61EADD || stack[idx] == dw_673413 || stack[idx] == dw_61F19D)
{
flt_7933E0.a13 += Screen.fHudOffsetWide;
}
|
unix: comment format | @@ -144,8 +144,8 @@ _unix_down(c3_c* pax_c, c3_c* sub_c)
}
/* _unix_string_to_path(): convert c string to u3_noun path
- *
- * c string must begin with the pier path plus mountpoint
+**
+** c string must begin with the pier path plus mountpoint
*/
static u3_noun
_unix_string_to_path_helper(c3_c* pax_c)
@@ -517,8 +517,8 @@ _unix_free_dir(u3_udir *dir_u)
}
/* _unix_free_node(): free node, deleting everything within
- *
- * also deletes from parent list if in it
+**
+** also deletes from parent list if in it
*/
static u3_noun
_unix_free_node(u3_unix* unx_u, u3_unod* nod_u)
@@ -561,12 +561,12 @@ _unix_free_node(u3_unix* unx_u, u3_unod* nod_u)
}
/* _unix_free_mount_point(): free mount point
- *
- * this process needs to happen in a very careful order. in particular,
- * we must recurse before we get to the callback, so that libuv does all
- * the child directories before it does us.
- *
- * tread carefully
+**
+** this process needs to happen in a very careful order. in particular,
+** we must recurse before we get to the callback, so that libuv does all
+** the child directories before it does us.
+**
+** tread carefully
*/
static void
_unix_free_mount_point(u3_unix* unx_u, u3_umon* mon_u)
@@ -706,12 +706,12 @@ _unix_create_dir(u3_udir* dir_u, u3_udir* par_u, u3_noun nam)
static u3_noun _unix_update_node(u3_unix* unx_u, u3_unod* nod_u);
/* _unix_update_file(): update file, producing list of changes
- *
- * when scanning through files, if dry, do nothing. otherwise, mark as
- * dry, then check if file exists. if not, remove self from node list
- * and add path plus sig to %into event. otherwise, read the file and
- * get a mug checksum. if same as gum_w, move on. otherwise, overwrite
- * add path plus data to %into event.
+**
+** when scanning through files, if dry, do nothing. otherwise, mark as
+** dry, then check if file exists. if not, remove self from node list
+** and add path plus sig to %into event. otherwise, read the file and
+** get a mug checksum. if same as gum_w, move on. otherwise, overwrite
+** add path plus data to %into event.
*/
static u3_noun
_unix_update_file(u3_unix* unx_u, u3_ufil* fil_u)
@@ -780,9 +780,9 @@ _unix_update_file(u3_unix* unx_u, u3_ufil* fil_u)
}
/* _unix_update_dir(): update directory, producing list of changes
- *
- * when changing this, consider whether to also change
- * _unix_initial_update_dir()
+**
+** when changing this, consider whether to also change
+** _unix_initial_update_dir()
*/
static u3_noun
_unix_update_dir(u3_unix* unx_u, u3_udir* dir_u)
|
[examples] with the new initialization process the insertion of a new interaction is taken into acount at the good time step | @@ -150,7 +150,7 @@ int main(int argc, char* argv[])
while (s->hasNextEvent())
{
- if (k==200) {
+ if (k==201) {
inter.reset(new Interaction(nslaw, relation));
// link the interaction and the dynamical system
|
Fix Pandas while checking for errors | @@ -138,12 +138,13 @@ class PandasImporter(object):
__is_importing__ = False
def find_module(self, fullname, mpath=None):
- if 'pandas.' in fullname:
- return self
if fullname == 'pandas' and not self.__is_importing__:
return self
+ if fullname in ('pandas._libs.writers', 'pandas.io.msgpack._packer', 'pandas.io.sas._sas', 'pandas._libs.hashtable', 'pandas._libs.reshape', 'pandas._libs.tslib', 'pandas._libs.interval', 'pandas._libs.missing', 'pandas._libs.ops', 'pandas.io.msgpack._unpacker', 'pandas._libs.hashing', 'pandas._libs.join', 'pandas._libs.sparse', 'pandas._libs.indexing', 'pandas._libs.parsers', 'pandas._libs.algos', 'pandas._libs.reduction', 'pandas._libs.testing', 'pandas._libs.properties', 'pandas._libs.internals', 'pandas._libs.window', 'pandas._libs.json', 'pandas._libs.index', 'pandas._libs.groupby', 'pandas._libs.skiplist', 'pandas._libs.lib', 'pandas.util._move', 'pandas._libs.tslibs.ccalendar', 'pandas._libs.tslibs.conversion', 'pandas._libs.tslibs.fields', 'pandas._libs.tslibs.nattype', 'pandas._libs.tslibs.timedeltas', 'pandas._libs.tslibs.frequencies', 'pandas._libs.tslibs.resolution', 'pandas._libs.tslibs.offsets', 'pandas._libs.tslibs.np_datetime', 'pandas._libs.tslibs.period', 'pandas._libs.tslibs.timezones', 'pandas._libs.tslibs.strptime', 'pandas._libs.tslibs.parsing', 'pandas._libs.tslibs.timestamps'):
+ return self
+
return
def load_module(self, fullname):
|
copy dir file changed | @@ -27,7 +27,7 @@ for p in range(len(planets)):
for w in range(len(water)):
for e in range(len(ecc)):
for r in range(len(rad)):
- new_directory = 'TR1_'+planets[p]+'_'+water[w][:-1]+'TO_ecc_'+ecc[e][:-1]+'_rad_'+rad[r][:-1]+''
+ #new_directory = 'TR1_'+planets[p]+'_'+water[w][:-1]+'TO_ecc_'+ecc[e][:-1]+'_rad_'+rad[r][:-1]+''
new_directory = 'TR1_'+str(dir_number)+''
os.system('cp -r TR1_'+planets[p]+'_example '+new_directory+'')
|
support comma delimited format option for external table | @@ -5051,6 +5051,10 @@ format_opt_list:
{
$$ = list_make2($1, $3);
}
+ | format_opt_item2 AS format_opt_item2
+ {
+ $$ = list_make2($1, $3);
+ }
| format_opt_list format_opt_item2
{
$$ = lappend($1, $2);
@@ -5059,11 +5063,18 @@ format_opt_list:
{
$$ = lappend(lappend($1, $2), $4);
}
+ | format_opt_list format_opt_item2 AS format_opt_item2
+ {
+ $$ = lappend(lappend($1, $2), $4);
+ }
+ | format_opt_list ',' format_opt_item2 '=' format_opt_item2
+ {
+ $$ = lappend(lappend($1, $3), $5);
+ }
;
format_opt_keyword:
- AS
- | DELIMITER
+ DELIMITER
| NULL_P
| CSV
| HEADER_P
@@ -5094,11 +5105,12 @@ format_opt_item2:
{
$$ = makeDefElem("#ident", (Node *)makeString($1));
}
- | columnListPlus
+ | '(' columnListPlus ')'
{
- $$ = makeDefElem("#collist", (Node *)$1);
+ $$ = makeDefElem("#collist", (Node *)$2);
}
;
+
/*
format_opt_item:
DELIMITER opt_as Sconst
|
pthread: Use INTERFACE in target_link_libraries for vPortCleanUpTCB wrapper | @@ -8,7 +8,7 @@ list(APPEND extra_link_flags "-u pthread_include_pthread_cond_impl")
list(APPEND extra_link_flags "-u pthread_include_pthread_local_storage_impl")
if(CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP)
- target_link_libraries(${COMPONENT_LIB} "-Wl,--wrap=vPortCleanUpTCB")
+ target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=vPortCleanUpTCB")
endif()
if(extra_link_flags)
|
compute_pqueue_growth(): Fix the return type | @@ -85,7 +85,7 @@ static const size_t max_nodes =
*
* We use an expansion factor of 8 / 5 = 1.6
*/
-static ossl_inline int compute_pqueue_growth(size_t target, size_t current)
+static ossl_inline size_t compute_pqueue_growth(size_t target, size_t current)
{
int err = 0;
|
Run Lua tests in CI. | @@ -253,6 +253,42 @@ jobs:
path: ${{runner.workspace}}/${{github.event.repository.name}}/tools/ci/tinyspline/
if-no-files-found: error
+ test-lua:
+ needs: [package]
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macos-10.15, macos-latest]
+ luaVersion: ["5.1", "5.2", "5.3", "5.4"]
+
+ steps:
+ - uses: actions/checkout@master
+ - uses: leafo/[email protected]
+ with:
+ luaVersion: ${{ matrix.luaVersion }}
+ - uses: leafo/[email protected]
+
+ - name: Download Packages
+ uses: actions/download-artifact@v2
+ with:
+ path: packages
+
+ - name: Install Package
+ shell: bash
+ run: |
+ cd $GITHUB_WORKSPACE/packages/tinyspline
+ if [ "$RUNNER_OS" == "Linux" ]; then
+ find . -name "*linux-x86_64.rock" -exec luarocks install {} \;
+ elif [ "$RUNNER_OS" == "Windows" ]; then
+ find . -name "*windows-x86_64.rock" -exec luarocks install {} \;
+ elif [ "$RUNNER_OS" == "macOS" ]; then
+ find . -name "*macosx-x86_64.rock" -exec luarocks install {} \;
+ fi
+
+ - name: Run Tests
+ shell: bash
+ run: lua $GITHUB_WORKSPACE/test/lua/tests.lua
+
test-python:
needs: [package]
runs-on: ${{ matrix.os }}
|
py/parse: Pass rule_id to push_result_token, instead of passing rule_t*. | @@ -414,7 +414,7 @@ STATIC mp_parse_node_t mp_parse_node_new_small_int_checked(parser_t *parser, mp_
return mp_parse_node_new_small_int(val);
}
-STATIC void push_result_token(parser_t *parser, const rule_t *rule) {
+STATIC void push_result_token(parser_t *parser, uint8_t rule_id) {
mp_parse_node_t pn;
mp_lexer_t *lex = parser->lexer;
if (lex->tok_kind == MP_TOKEN_NAME) {
@@ -422,7 +422,7 @@ STATIC void push_result_token(parser_t *parser, const rule_t *rule) {
#if MICROPY_COMP_CONST
// if name is a standalone identifier, look it up in the table of dynamic constants
mp_map_elem_t *elem;
- if (rule->rule_id == RULE_atom
+ if (rule_id == RULE_atom
&& (elem = mp_map_lookup(&parser->consts, MP_OBJ_NEW_QSTR(id), MP_MAP_LOOKUP)) != NULL) {
if (MP_OBJ_IS_SMALL_INT(elem->value)) {
pn = mp_parse_node_new_small_int_checked(parser, elem->value);
@@ -433,7 +433,7 @@ STATIC void push_result_token(parser_t *parser, const rule_t *rule) {
pn = mp_parse_node_new_leaf(MP_PARSE_NODE_ID, id);
}
#else
- (void)rule;
+ (void)rule_id;
pn = mp_parse_node_new_leaf(MP_PARSE_NODE_ID, id);
#endif
} else if (lex->tok_kind == MP_TOKEN_INTEGER) {
@@ -846,7 +846,7 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) {
uint16_t kind = rule->arg[i] & RULE_ARG_KIND_MASK;
if (kind == RULE_ARG_TOK) {
if (lex->tok_kind == (rule->arg[i] & RULE_ARG_ARG_MASK)) {
- push_result_token(&parser, rule);
+ push_result_token(&parser, rule->rule_id);
mp_lexer_to_next(lex);
goto next_rule;
}
@@ -890,7 +890,7 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) {
if (lex->tok_kind == tok_kind) {
// matched token
if (tok_kind == MP_TOKEN_NAME) {
- push_result_token(&parser, rule);
+ push_result_token(&parser, rule->rule_id);
}
mp_lexer_to_next(lex);
} else {
@@ -1022,7 +1022,7 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) {
if (i & 1 & n) {
// separators which are tokens are not pushed to result stack
} else {
- push_result_token(&parser, rule);
+ push_result_token(&parser, rule->rule_id);
}
mp_lexer_to_next(lex);
// got element of list, so continue parsing list
|
8042: Move VERIFY_AUX methods so they are next to VERIFY_LPC_CHAR
VERIFY_LPC_CHAR had to be moved in the previous CL, this CL completes
the move.
BRANCH=none
TEST=run unit tests | @@ -103,6 +103,37 @@ void lpc_aux_put_char(uint8_t chr, int send_irq)
TEST_EQ(queue_is_empty(&kbd_8042_ctrl_to_host), 1, "%d"); \
} while (0)
+#define VERIFY_AUX_TO_HOST(expected_data, expected_irq) \
+ do { \
+ struct to_host_data data; \
+ msleep(30); \
+ TEST_EQ(queue_remove_unit(&aux_to_host, &data), (size_t)1, \
+ "%zd"); \
+ TEST_EQ(data.data, expected_data, "%#x"); \
+ TEST_EQ(data.irq, expected_irq, "%u"); \
+ } while (0)
+
+#define VERIFY_AUX_TO_HOST_EMPTY() \
+ do { \
+ msleep(30); \
+ TEST_ASSERT(queue_is_empty(&aux_to_host)); \
+ } while (0)
+
+#define VERIFY_AUX_TO_DEVICE(expected_data) \
+ do { \
+ uint8_t _data; \
+ msleep(30); \
+ TEST_EQ(queue_remove_unit(&aux_to_device, &_data), (size_t)1, \
+ "%zd"); \
+ TEST_EQ(_data, expected_data, "%#x"); \
+ } while (0)
+
+#define VERIFY_AUX_TO_DEVICE_EMPTY() \
+ do { \
+ msleep(30); \
+ TEST_ASSERT(queue_is_empty(&aux_to_device)); \
+ } while (0)
+
static void press_key(int c, int r, int pressed)
{
ccprintf("Input %s (%d, %d)\n", action[pressed], c, r);
@@ -184,37 +215,6 @@ static int _read_cmd_byte(uint8_t *cmd)
cmd; \
})
-#define VERIFY_AUX_TO_HOST(expected_data, expected_irq) \
- do { \
- struct to_host_data data; \
- msleep(30); \
- TEST_EQ(queue_remove_unit(&aux_to_host, &data), (size_t)1, \
- "%zd"); \
- TEST_EQ(data.data, expected_data, "%#x"); \
- TEST_EQ(data.irq, expected_irq, "%u"); \
- } while (0)
-
-#define VERIFY_AUX_TO_HOST_EMPTY() \
- do { \
- msleep(30); \
- TEST_ASSERT(queue_is_empty(&aux_to_host)); \
- } while (0)
-
-#define VERIFY_AUX_TO_DEVICE(expected_data) \
- do { \
- uint8_t _data; \
- msleep(30); \
- TEST_EQ(queue_remove_unit(&aux_to_device, &_data), (size_t)1, \
- "%zd"); \
- TEST_EQ(_data, expected_data, "%#x"); \
- } while (0)
-
-#define VERIFY_AUX_TO_DEVICE_EMPTY() \
- do { \
- msleep(30); \
- TEST_ASSERT(queue_is_empty(&aux_to_device)); \
- } while (0)
-
/*
* We unfortunately don't have an Input Buffer Full (IBF). Instead we
* directly write to the task's input queue. Ideally we would have an
|
Add OwnerID field to Companion struct | @@ -15,5 +15,6 @@ namespace FFXIVClientStructs.Client.Game.Character
public unsafe struct Companion
{
[FieldOffset(0x0)] public Character Character;
+ [FieldOffset(0x1878)] public uint OwnerID;
}
}
|
Also update extranonce if client subscribed for updates and submitted a duplicate share | @@ -159,6 +159,7 @@ namespace Miningcore.Blockchain.Bitcoin
{
var request = tsRequest.Value;
var context = client.ContextAs<BitcoinWorkerContext>();
+ var updateExtraNonce = false;
try
{
@@ -209,7 +210,10 @@ namespace Miningcore.Blockchain.Bitcoin
// send new extranonce if miner is getting close to exhausting available nonce-space
if (!share.IsBlockCandidate && context.HasExtraNonceSubscription && nonceSpaceUsed >= 0.9)
- await UpdateExtraNonceAsync(client, nonceSpaceUsed);
+ {
+ logger.Info(() => $"[{client.ConnectionId}] Assigning new extra-nonce at {(int)(nonceSpaceUsed * 100)}% NS");
+ updateExtraNonce = true;
+ }
}
catch (StratumException ex)
@@ -221,11 +225,28 @@ namespace Miningcore.Blockchain.Bitcoin
context.Stats.InvalidShares++;
logger.Info(() => $"[{client.ConnectionId}] Share rejected: {ex.Message}");
+ // update extra-nonce
+ if (ex.Code == StratumError.DuplicateShare)
+ {
+ logger.Info(() => $"[{client.ConnectionId}] Assigning new extra-nonce on duplicate share");
+ updateExtraNonce = true;
+
+ // make sure submit is answered before updating extra-nonce
+ await client.RespondErrorAsync(ex.Code, ex.Message, request.Id, false);
+ }
+
// banning
ConsiderBan(client, context, poolConfig.Banning);
+ if(!updateExtraNonce)
throw;
}
+
+ finally
+ {
+ if (updateExtraNonce)
+ await UpdateExtraNonceAsync(client);
+ }
}
private async Task OnSuggestDifficultyAsync(StratumClient client, Timestamped<JsonRpcRequest> tsRequest)
@@ -381,13 +402,11 @@ namespace Miningcore.Blockchain.Bitcoin
}
}
- private async Task UpdateExtraNonceAsync(StratumClient client, double nonceSpaceUsed)
+ private async Task UpdateExtraNonceAsync(StratumClient client)
{
var parameters = manager.UpdateSubscriberData(client);
await client.NotifyAsync(BitcoinStratumMethods.SetExtraNonce, parameters);
- logger.Info(() => $"[{client.ConnectionId}] Assigned new extra-nonce {parameters[0]} at {(int)(nonceSpaceUsed * 100)}% NS");
-
// force work restart using new extra-nonce
await client.NotifyAsync(BitcoinStratumMethods.MiningNotify, currentJobParams);
}
|
Add step for disabling SIP to README.macOS.md | We've confirmed that these steps work on a brand new installation of macOS Sierra or a
brand new installation of macOS Sierra with [Pivotal's workstation-setup](https://github.com/pivotal/workstation-setup)
+## Step: Disable System Integrity Protection
+
+Note that you may need to disable System Integrity Protection in order to bring
+up the gpdemo cluster. Without doing this, psql commands run in child processes
+spawned by gpinitsystem may have the DYLD_* environment variables removed from
+their environments.
+
## Step: install needed dependencies. This will install homebrew if missing
```
./README.macOS.bash
|
helm: Add CI permissions and update workflow name. | -name: Lint and test helm charts
+name: helm-chart-lint
on:
push:
@@ -6,6 +6,20 @@ on:
- main
pull_request:
+permissions:
+ actions: none
+ checks: none
+ contents: none
+ deployments: none
+ id-token: none
+ issues: none
+ discussions: none
+ packages: none
+ pull-requests: none
+ repository-projects: none
+ security-events: none
+ statuses: none
+
jobs:
lint-test:
runs-on: ubuntu-latest
|
Fix build failure on Windows arm64 | @@ -204,7 +204,7 @@ struct vint4
{
uint32x2_t t8 {};
// Cast is safe - NEON loads are allowed to be unaligned
- t8 = vld1_lane_u32((const uint32_t*)p, t8, 0);
+ t8 = vld1_lane_u32(reinterpret_cast<const uint32_t*>(p), t8, 0);
uint16x4_t t16 = vget_low_u16(vmovl_u8(vreinterpret_u8_u32(t8)));
m = vreinterpretq_s32_u32(vmovl_u16(t16));
}
@@ -346,6 +346,14 @@ struct vmask4
m = vreinterpretq_u32_s32(ms);
}
+ /**
+ * @brief Get the scalar from a single lane.
+ */
+ template <int32_t l> ASTCENC_SIMD_INLINE uint32_t lane() const
+ {
+ return vgetq_lane_s32(m, l);
+ }
+
/**
* @brief The vector ...
*/
@@ -582,7 +590,7 @@ ASTCENC_SIMD_INLINE void store(vint4 a, int* p)
*/
ASTCENC_SIMD_INLINE void store_nbytes(vint4 a, uint8_t* p)
{
- vst1q_lane_s32((int32_t*)p, a.m, 0);
+ vst1q_lane_s32(reinterpret_cast<int32_t*>(p), a.m, 0);
}
/**
@@ -874,7 +882,7 @@ ASTCENC_SIMD_INLINE vint4 float_to_float16(vfloat4 a)
static inline uint16_t float_to_float16(float a)
{
vfloat4 av(a);
- return float_to_float16(av).lane<0>();
+ return static_cast<uint16_t>(float_to_float16(av).lane<0>());
}
/**
@@ -1017,22 +1025,22 @@ ASTCENC_SIMD_INLINE vint4 interleave_rgba8(vint4 r, vint4 g, vint4 b, vint4 a)
*/
ASTCENC_SIMD_INLINE void store_lanes_masked(int* base, vint4 data, vmask4 mask)
{
- if (mask.m[3])
+ if (mask.lane<3>())
{
store(data, base);
}
- else if(mask.m[2])
+ else if(mask.lane<2>())
{
base[0] = data.lane<0>();
base[1] = data.lane<1>();
base[2] = data.lane<2>();
}
- else if(mask.m[1])
+ else if(mask.lane<1>())
{
base[0] = data.lane<0>();
base[1] = data.lane<1>();
}
- else if(mask.m[0])
+ else if(mask.lane<0>())
{
base[0] = data.lane<0>();
}
|
add new stream for ocean | 1250 ewla Ensemble Wave Long window data Assimilation
1251 wamd Wave monthly means of daily means
1252 gfas Global fire assimilation system
+1253 ocda Ocean Data Assimilation
+1254 olda Ocean Long window Data Assimilation
2231 cnrm Meteo France climate centre
2232 mpic Max Plank Institute
2233 ukmo UKMO climate centre
|
make CC2500_GDO0_EXTI_HANDLER configurable | #define CC2500_GDO0_PINSOURCE GPIO_PinSource14
#define CC2500_GDO0_EXTI_PINSOURCE EXTI_PortSourceGPIOC
#define CC2500_GDO0_EXTI_LINE EXTI_Line14
+#define CC2500_GDO0_EXTI_HANDLER EXTI15_10_IRQHandler
#define CC2500_GDO0_PIN GPIO_Pin_14
#define CC2500_GDO0_PORT GPIOC
#endif
@@ -170,7 +171,7 @@ void cc2500_hardware_init() {
SPI_I2S_ReceiveData(CC2500_SPI_INSTANCE);
}
-void EXTI15_10_IRQHandler(void) {
+void CC2500_GDO0_EXTI_HANDLER() {
if (EXTI_GetITStatus(CC2500_GDO0_EXTI_LINE) != RESET) {
gdo0_exti_status = 1;
EXTI_ClearITPendingBit(CC2500_GDO0_EXTI_LINE);
|
O365Connector: groups pagination part1 | <!-- <autoDetectParserConfig> -->
<!-- <metadataWriteFilterFactory class="org.apache.tika.metadata.StandardWriteFilterFactory"> -->
<!-- <params> -->
+<!-- <maxKeySize>1000</maxKeySize> -->
+<!-- <maxFieldSize>25000</maxFieldSize> -->
+<!-- <maxValuesPerField>20</maxValuesPerField> -->
<!-- <maxEstimatedBytes>500000</maxEstimatedBytes> -->
<!-- </params> -->
<!-- </metadataWriteFilterFactory> -->
|
[tce] loopvec case xfails now also with LLVM 7.0 | @@ -53,7 +53,9 @@ set_tests_properties( "tce/fp16/loopvec"
ENVIRONMENT "POCL_DEVICES=ttasim;POCL_TTASIM0_PARAMETERS=${CMAKE_SOURCE_DIR}/tools/data/test_machine_fp16.adf;POCL_WORK_GROUP_METHOD=loopvec"
DEPENDS "pocl_version_check")
-if(LLVM_OLDER_THAN_6_0)
+#if(LLVM_OLDER_THAN_6_0)
+# TODO: Produces wrong results also with LLVM 7 now. It seems to be very
+# fragile to IR changes.
set_property(TEST "tce/fp16/loopvec"
APPEND PROPERTY WILL_FAIL 1)
-endif()
+#endif()
|
YAML CPP: Extend MSR test | @@ -256,6 +256,11 @@ echo 'bin: !!binary aGk=' > `kdb file /examples/binary`
kdb get /examples/binary/bin
#> \x68\x69
+# We can use `printf` to convert the hexadecimal value returned by `kdb get`
+# to its ASCII representation.
+printf `kdb get /examples/binary/bin`
+#> hi
+
# Add a string value to the database
kdb set /examples/binary/text mate
# Base 64 does not modify textual values
|
revert r5694612 because it breaks open-source build. | @@ -38,7 +38,7 @@ class PythonTrait(object):
def gen_cmd(self):
cmd = [
sys.executable, arc_root + '/ya', 'make', os.path.join(arc_root, 'catboost', 'python-package', 'catboost'),
- '--checkout', '--no-src-links', '-r', '--output', out_root, '-DPYTHON_CONFIG=' + self.py_config, '-DNO_DEBUGINFO', '-DOS_SDK=local',
+ '--no-src-links', '-r', '--output', out_root, '-DPYTHON_CONFIG=' + self.py_config, '-DNO_DEBUGINFO', '-DOS_SDK=local',
]
if not self.python_version.from_sandbox:
|
BugID:17386135: [missing return]fix WhiteScan issue | @@ -62,19 +62,21 @@ static float acc_val_limit(float val);
/* LED1 gpio config */
static int als_led1_gpio_config(uint8_t led_config)
{
+ int ret = 0;
do {
switch (led_config) {
case LED_ON_LOW_DEFAULT:
- hal_gpio_output_low(&brd_gpio_table[GPIO_LED_1]);
+ ret = hal_gpio_output_low(&brd_gpio_table[GPIO_ALS_LED]);
break;
case LED_OFF_HIGH:
- hal_gpio_output_high(&brd_gpio_table[GPIO_LED_1]);
+ ret = hal_gpio_output_high(&brd_gpio_table[GPIO_ALS_LED]);
break;
default:
- hal_gpio_output_high(&brd_gpio_table[GPIO_LED_1]);
+ ret = hal_gpio_output_high(&brd_gpio_table[GPIO_ALS_LED]);
break;
}
} while (0);
+ return ret;
}
static int get_als_data(uint32_t *lux)
|
CBLK: Set retries to 0 as requested by hardware development | #define CBLK_NBLOCKS 2 /* tuneup for the prefetch strategy */
#define CONFIG_COMPLETION_THREADS 1 /* 1 works best */
-#define CONFIG_MAX_RETRIES 5 /* 5 is good, 0: no retries */
+#define CONFIG_MAX_RETRIES 0 /* 5 is good, 0: no retries */
#define CONFIG_BUSY_TIMEOUT_SEC 5
#define CONFIG_REQ_TIMEOUT_SEC 2
#define CONFIG_REQ_DURATION_USEC 100000 /* usec */
|
Interaction profiles suggestion improvement
At least one profile should be supported. Monado fails on Neo 3 profile. | @@ -833,15 +833,18 @@ static bool openxr_init(HeadsetConfig* config) {
suggestedBindings[j].binding = path;
}
+ int successProfiles = 0;
if (count > 0) {
XR_INIT(xrStringToPath(state.instance, interactionProfilePaths[i], &path));
- XR_INIT(xrSuggestInteractionProfileBindings(state.instance, &(XrInteractionProfileSuggestedBinding) {
+ int res = (xrSuggestInteractionProfileBindings(state.instance, &(XrInteractionProfileSuggestedBinding) {
.type = XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING,
.interactionProfile = path,
.countSuggestedBindings = count,
.suggestedBindings = suggestedBindings
}));
+ if (XR_SUCCEEDED(res)) successProfiles++;
}
+ XR_INIT(successProfiles);
}
}
|
Improve built-in touchscreen detection
Adds detection code to handle pci-*-platform-* strings
in ID_PATH
References: | @@ -332,6 +332,13 @@ bool sway_libinput_device_is_builtin(struct sway_input_device *sway_device) {
return false;
}
- const char prefix[] = "platform-";
- return strncmp(id_path, prefix, strlen(prefix)) == 0;
+ const char prefix_platform[] = "platform-";
+ if (strncmp(id_path, prefix_platform, strlen(prefix_platform)) != 0) {
+ return false;
+ }
+
+ const char prefix_pci[] = "pci-";
+ const char infix_platform[] = "-platform-";
+ return (strncmp(id_path, prefix_pci, strlen(prefix_pci)) == 0) &&
+ strstr(id_path, infix_platform);
}
|
common/chargen.c: Format with clang-format
BRANCH=none
TEST=none | * Microseconds time to drain entire UART_TX console buffer at 115200 b/s, 10
* bits per character.
*/
-#define BUFFER_DRAIN_TIME_US (1000000UL * 10 * CONFIG_UART_TX_BUF_SIZE \
- / CONFIG_UART_BAUD_RATE)
+#define BUFFER_DRAIN_TIME_US \
+ (1000000UL * 10 * CONFIG_UART_TX_BUF_SIZE / CONFIG_UART_BAUD_RATE)
/*
* Generate a stream of characters on the UART (and USB) console.
@@ -128,6 +128,5 @@ DECLARE_SAFE_CONSOLE_COMMAND(chargen, command_chargen,
#endif
"Generate a constant stream of characters on the "
"UART console,\nrepeating every 'seq_length' "
- "characters, up to 'num_chars' total."
- );
+ "characters, up to 'num_chars' total.");
#endif /* !SECTION_IS_RO */
|
vhost_user: 'nregions' saves the actual number of mapped guest physical address area
This patch fixed the VMA leak that if mapping one of guest physical address area get failed. | @@ -852,8 +852,9 @@ vhost_user_socket_read (clib_file_t * uf)
}
vui->region_mmap_addr[i] += vui->regions[i].mmap_offset;
vui->region_mmap_fd[i] = fds[i];
+
+ vui->nregions++;
}
- vui->nregions = msg.memory.nregions;
break;
case VHOST_USER_SET_VRING_NUM:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.