message
stringlengths
6
474
diff
stringlengths
8
5.22k
decisions: add _
@@ -113,7 +113,7 @@ Explanations of the template are in [EXPLANATIONS.md](../EXPLANATIONS.md). ```mermaid flowchart LR - s((Start)) --> Drafts --> In Discussion -> In Progress -> Decided -> Partially Implemented -> Implemented + s((Start)) --> Drafts --> In_Discussion -> In_Progress -> Decided -> Partially_Implemented -> Implemented %% Shortcuts: s --> Decided @@ -124,10 +124,10 @@ flowchart LR s --o Delayed Drafts --x Rejected Drafts --o Delayed - In Discussion --x Rejected - In Discussion --o Delayed - In Progress --x Rejected - In Progress --o Delayed + In_Discussion --x Rejected + In_Discussion --o Delayed + In_Progress --x Rejected + In_Progress --o Delayed ``` Following subsections describe all steps a decision might run through.
Setup: Update DelayLoadDLLs
<AdditionalLibraryDirectories>$(SolutionDir)..\..\phlib\bin\$(Configuration)$(PlatformArchitecture);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <SubSystem>Windows</SubSystem> <MinimumRequiredVersion>6.01</MinimumRequiredVersion> - <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>advapi32.dll;comctl32.dll;gdi32.dll;ole32.dll;oleaut32.dll;shell32.dll;user32.dll;uxtheme.dll;winhttp.dll;%(DelayLoadDLLs)</DelayLoadDLLs> </Link> <ResourceCompile> <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions);$(ExternalCompilerOptions)</PreprocessorDefinitions> <SubSystem>Windows</SubSystem> <MinimumRequiredVersion>6.01</MinimumRequiredVersion> <SetChecksum>true</SetChecksum> - <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>advapi32.dll;comctl32.dll;gdi32.dll;ole32.dll;oleaut32.dll;shell32.dll;user32.dll;uxtheme.dll;winhttp.dll;%(DelayLoadDLLs)</DelayLoadDLLs> </Link> <ResourceCompile> <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions);$(ExternalCompilerOptions)</PreprocessorDefinitions>
Support SmartThings motion and contact sensors By GitHub issue
@@ -78,6 +78,8 @@ static const SupportedDevice supportedDevices[] = { { VENDOR_BUSCH_JAEGER, "RB01", bjeMacPrefix }, { VENDOR_BUSCH_JAEGER, "RM01", bjeMacPrefix }, { VENDOR_CENTRALITE, "Motion Sensor-A", emberMacPrefix }, + { VENDOR_CENTRALITE, "3325-S", emberMacPrefix }, + { VENDOR_CENTRALITE, "3321-S", emberMacPrefix }, { VENDOR_NONE, "LM_", tiMacPrefix }, { VENDOR_NONE, "LMHT_", tiMacPrefix }, { VENDOR_NONE, "IR_", tiMacPrefix },
Increase RAM allocation for CRT in STM746
@@ -203,7 +203,7 @@ nf_set_linker_options(${NANOCLR_PROJECT_NAME}.elf TRUE) # the size of the CLR managed heap is defined here ################################################### set_property(TARGET ${NANOBOOTER_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS ",--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x400,--defsym=__crt_heap_size__=0x1000") -set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS ",--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x800,--defsym=__crt_heap_size__=0x1800") +set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS ",--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x800,--defsym=__crt_heap_size__=0x2000") # generate output files nf_generate_build_output_files(${NANOBOOTER_PROJECT_NAME}.elf)
SOVERSION bump to version 6.4.7
@@ -68,7 +68,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 6) set(SYSREPO_MINOR_SOVERSION 4) -set(SYSREPO_MICRO_SOVERSION 6) +set(SYSREPO_MICRO_SOVERSION 7) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
send multiple 1xx
@@ -256,6 +256,9 @@ builder { "HTTP/1.1 100 Continue", "link: </index.js>; rel=preload", "", + "HTTP/1.1 100 Continue", + "link: </index.js>; rel=preload", + "", "", ); sleep 1.1;
mp: fix return value handling on msgpack_unpack()
static inline int mp_count(void *data, size_t bytes, msgpack_zone *zone) { int c = 0; + int ret; size_t off = 0; msgpack_zone *t = NULL; msgpack_object obj; @@ -39,9 +40,15 @@ static inline int mp_count(void *data, size_t bytes, msgpack_zone *zone) t = zone; } - while (msgpack_unpack(data, bytes, &off, t, &obj) == MSGPACK_UNPACK_SUCCESS) { + do { + ret = msgpack_unpack(data, bytes, &off, t, &obj); + if (ret == MSGPACK_UNPACK_SUCCESS || ret == MSGPACK_UNPACK_EXTRA_BYTES) { c++; } + else { + break; + } + } while (1); msgpack_zone_clear(t); if (t != zone) {
remove FCLK_CLK0 from base_system
-# Create processing_system7 -cell xilinx.com:ip:processing_system7:5.5 ps_0 { - PCW_IMPORT_BOARD_PRESET cfg/red_pitaya.xml - PCW_USE_S_AXI_HP0 1 -} { - M_AXI_GP0_ACLK ps_0/FCLK_CLK0 - S_AXI_HP0_ACLK ps_0/FCLK_CLK0 -} - -# Create all required interconnections -apply_bd_automation -rule xilinx.com:bd_rule:processing_system7 -config { - make_external {FIXED_IO, DDR} - Master Disable - Slave Disable -} [get_bd_cells ps_0] - -# PLL - # Create clk_wiz cell xilinx.com:ip:clk_wiz:5.3 pll_0 { PRIMITIVE PLL @@ -24,11 +6,24 @@ cell xilinx.com:ip:clk_wiz:5.3 pll_0 { PRIM_SOURCE Differential_clock_capable_pin CLKOUT1_USED true CLKOUT1_REQUESTED_OUT_FREQ 125.0 - CLKOUT2_USED true - CLKOUT2_REQUESTED_OUT_FREQ 250.0 - CLKOUT2_REQUESTED_PHASE -90.0 USE_RESET false } { clk_in1_p adc_clk_p_i clk_in1_n adc_clk_n_i } + +# Create processing_system7 +cell xilinx.com:ip:processing_system7:5.5 ps_0 { + PCW_IMPORT_BOARD_PRESET cfg/red_pitaya.xml + PCW_USE_S_AXI_HP0 1 +} { + M_AXI_GP0_ACLK pll_0/clk_out1 + S_AXI_HP0_ACLK pll_0/clk_out1 +} + +# Create all required interconnections +apply_bd_automation -rule xilinx.com:bd_rule:processing_system7 -config { + make_external {FIXED_IO, DDR} + Master Disable + Slave Disable +} [get_bd_cells ps_0]
tests/run-tests: Make diff tool user configurable.
@@ -21,6 +21,9 @@ else: # mpy-cross is only needed if --via-mpy command-line arg is passed MPYCROSS = os.getenv('MICROPY_MPYCROSS', '../mpy-cross/mpy-cross') +# For diff'ing test output +DIFF = os.getenv('MICROPY_DIFF', 'diff -u') + # Set PYTHONIOENCODING so that CPython will use utf-8 on systems which set another encoding in the locale os.environ['PYTHONIOENCODING'] = 'utf-8' @@ -603,7 +606,7 @@ the last matching regex is used: testbase = os.path.basename(exp)[:-4] print() print("FAILURE {0}".format(testbase)) - os.system("diff -u {0}.exp {0}.out".format(testbase)) + os.system("{0} {1}.exp {1}.out".format(DIFF, testbase)) sys.exit(0)
Don't accidentally return the end index in input for dynamic arrays.
:: find the word index of the actual data. =. win (div (rash wor hex) 32) :: read the elements from their location. + %- tail %^ decode-array-n ~[t.typ] +(win) (rash (snag win wos) hex) ::
Add dofile function. Abstracts the actually running of a file from the require function, so a file can be easily evaluated without being cached.
circular dependencies." @{}) -(defn require - "Require a module with the given name. Will search all of the paths in - module/paths, then the path as a raw file path. Returns the new environment - returned from compiling and running the file." +(defn dofile + "Evaluate a file in a new environment and return the new environment." [path & args] (def {:exit exit-on-error} (table ;args)) - (if-let [check (get module/cache path)] - check - (do - (def [fullpath mod-kind] (module/find path)) - (unless fullpath (error mod-kind)) - (def env - (case mod-kind - :source (do - # Normal janet module - (def f (file/open fullpath)) + (def f (file/open path)) (def newenv (make-env)) - (put module/loading fullpath true) (defn chunks [buf _] (file/read f 2048 buf)) (defn bp [&opt x y] (def ret (bad-parse x y)) (when (not= (fiber/status f) :dead) (debug/stacktrace f x) (if exit-on-error (os/exit 1)))) - :source fullpath}) + :source path}) (file/close f) - (put module/loading fullpath nil) (table/setproto newenv nil)) + +(defn require + "Require a module with the given name. Will search all of the paths in + module/paths, then the path as a raw file path. Returns the new environment + returned from compiling and running the file." + [path & args] + (if-let [check (get module/cache path)] + check + (do + (def [fullpath mod-kind] (module/find path)) + (unless fullpath (error mod-kind)) + (def env + (case mod-kind + :source (do + (put module/loading fullpath true) + (def newenv (dofile fullpath ;args)) + (put module/loading fullpath nil) + newenv) :native (native fullpath (make-env)) :image (load-image (slurp fullpath)))) (put module/cache fullpath env)
[mod_trigger_b4_dl] gdbm_reorganize once a day
@@ -536,7 +536,7 @@ static void mod_trigger_b4_dl_trigger_gdbm(GDBM_FILE db, const time_t cur_ts, co if (okey.dptr) free(okey.dptr); /* reorg once a day */ - if ((cur_ts % (60 * 60 * 24) != 0)) gdbm_reorganize(db); + if ((cur_ts % (60 * 60 * 24) == 0)) gdbm_reorganize(db); } TRIGGER_FUNC(mod_trigger_b4_dl_handle_trigger) {
Rename "Inkjet Printer" test queue to "Office Printer" to reflect a more generic focus.
@@ -218,9 +218,9 @@ main(int argc, // I - Number of command-line arguments papplSystemSetLocation(system, "Test Lab 42"); papplSystemSetOrganization(system, "Lakeside Robotics"); - printer = papplPrinterCreate(system, /* printer_id */0, "Inkjet Printer", "pwg_common-300dpi-600dpi-srgb_8", "file:///dev/null"); + printer = papplPrinterCreate(system, /* printer_id */0, "Office Printer", "pwg_common-300dpi-600dpi-srgb_8", "file:///dev/null"); papplPrinterSetContact(printer, &contact); - papplPrinterSetDNSSDName(printer, "Inkjet Printer"); + papplPrinterSetDNSSDName(printer, "Office Printer"); papplPrinterSetGeoLocation(printer, "geo:46.4707,-80.9961"); papplPrinterSetLocation(printer, "Test Lab 42"); papplPrinterSetOrganization(printer, "Lakeside Robotics");
output: dont check tls vars if tmp is NULL (CID 156536)
@@ -297,7 +297,7 @@ int flb_output_set_property(struct flb_output_instance *out, char *k, char *v) } } #ifdef FLB_HAVE_TLS - else if (prop_key_check("tls", k, len) == 0) { + else if (prop_key_check("tls", k, len) == 0 && tmp) { if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "on") == 0) { out->use_tls = FLB_TRUE; } @@ -306,7 +306,7 @@ int flb_output_set_property(struct flb_output_instance *out, char *k, char *v) } flb_free(tmp); } - else if (prop_key_check("tls.verify", k, len) == 0) { + else if (prop_key_check("tls.verify", k, len) == 0 && tmp) { if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "on") == 0) { out->tls_verify = FLB_TRUE; } @@ -342,6 +342,7 @@ int flb_output_set_property(struct flb_output_instance *out, char *k, char *v) prop->val = tmp; mk_list_add(&prop->_head, &out->properties); } + return 0; }
Try to avoid a compiler warning about using fxid uninitialized. Mark Dilger, with a couple of stray semicolons removed by me. Discussion:
@@ -555,7 +555,7 @@ check_tuple_header_and_visibilty(HeapTupleHeader tuphdr, HeapCheckContext *ctx) { uint16 infomask = tuphdr->t_infomask; bool header_garbled = false; - unsigned expected_hoff;; + unsigned expected_hoff; if (ctx->tuphdr->t_hoff > ctx->lp_len) { @@ -1368,24 +1368,26 @@ check_mxid_valid_in_rel(MultiXactId mxid, HeapCheckContext *ctx) * truly been valid at that time. * * If the status argument is not NULL, and if and only if the transaction ID - * appears to be valid in this relation, clog will be consulted and the commit - * status argument will be set with the status of the transaction ID. + * appears to be valid in this relation, the status argument will be set with + * the commit status of the transaction ID. */ static XidBoundsViolation get_xid_status(TransactionId xid, HeapCheckContext *ctx, XidCommitStatus *status) { - XidBoundsViolation result; FullTransactionId fxid; FullTransactionId clog_horizon; /* Quick check for special xids */ if (!TransactionIdIsValid(xid)) - result = XID_INVALID; + return XID_INVALID; else if (xid == BootstrapTransactionId || xid == FrozenTransactionId) - result = XID_BOUNDS_OK; - else { + if (status != NULL) + *status = XID_COMMITTED; + return XID_BOUNDS_OK; + } + /* Check if the xid is within bounds */ fxid = FullTransactionIdFromXidAndCtx(xid, ctx); if (!fxid_in_cached_range(fxid, ctx)) @@ -1400,28 +1402,21 @@ get_xid_status(TransactionId xid, HeapCheckContext *ctx, } if (FullTransactionIdPrecedesOrEquals(ctx->next_fxid, fxid)) - result = XID_IN_FUTURE; - else if (FullTransactionIdPrecedes(fxid, ctx->oldest_fxid)) - result = XID_PRECEDES_CLUSTERMIN; - else if (FullTransactionIdPrecedes(fxid, ctx->relfrozenfxid)) - result = XID_PRECEDES_RELMIN; - else - result = XID_BOUNDS_OK; - } + return XID_IN_FUTURE; + if (FullTransactionIdPrecedes(fxid, ctx->oldest_fxid)) + return XID_PRECEDES_CLUSTERMIN; + if (FullTransactionIdPrecedes(fxid, ctx->relfrozenfxid)) + return XID_PRECEDES_RELMIN; - /* - * Early return if the caller does not request clog checking, or if the - * xid is already known to be out of bounds. We dare not check clog for - * out of bounds transaction IDs. - */ - if (status == NULL || result != XID_BOUNDS_OK) - return result; + /* Early return if the caller does not request clog checking */ + if (status == NULL) + return XID_BOUNDS_OK; /* Early return if we just checked this xid in a prior call */ if (xid == ctx->cached_xid) { *status = ctx->cached_status; - return result; + return XID_BOUNDS_OK; } *status = XID_COMMITTED; @@ -1443,5 +1438,5 @@ get_xid_status(TransactionId xid, HeapCheckContext *ctx, LWLockRelease(XactTruncationLock); ctx->cached_xid = xid; ctx->cached_status = *status; - return result; + return XID_BOUNDS_OK; }
Review 2017-03-13: replace magic number with appropriate string len
@@ -3673,19 +3673,23 @@ START_TEST(test_byte_info_at_end) END_TEST /* Test position information from errors */ +#define PRE_ERROR_STR "<doc></" +#define POST_ERROR_STR "wombat></doc>" START_TEST(test_byte_info_at_error) { - const char *text = "<doc></wombat></doc>"; + const char *text = PRE_ERROR_STR POST_ERROR_STR; if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_OK) fail("Syntax error not faulted"); if (XML_GetCurrentByteCount(parser) != 0) fail("Error byte count incorrect"); - if (XML_GetCurrentByteIndex(parser) != 7) + if (XML_GetCurrentByteIndex(parser) != strlen(PRE_ERROR_STR)) fail("Error byte index incorrect"); } END_TEST +#undef PRE_ERROR_STR +#undef POST_ERROR_STR /* Test position information in handler */ static void
docs/fingerprint: Add links to info on fuzz testing BRANCH=none TEST=view in gitiles
@@ -121,6 +121,12 @@ See the [Unit Tests] documentation for details on how to [run the unit tests]. ## Build and run the `host_command` fuzz test +<!-- mdformat off(b/139308852) --> +*** note +NOTE: For more details on fuzzing, see [Fuzz Testing in ChromeOS]. +*** +<!-- mdformat on --> + ```bash (chroot) ~/trunk/src/platform/ec $ make run-host_command_fuzz ``` @@ -602,3 +608,4 @@ that are connected via UART use [`cros_ec_uart.c`]. [`cros_ec`]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/kernel/upstream/drivers/platform/chrome/cros_ec.c [`cros_ec_spi.c`]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/kernel/upstream/drivers/platform/chrome/cros_ec_spi.c [`cros_ec_uart.c`]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/kernel/upstream/drivers/platform/chrome/cros_ec_uart.c +[Fuzz Testing in ChromeOS]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/testing/fuzzing.md
Fix regression in EVP_DigestInit_ex: crash when called with NULL type
@@ -170,8 +170,15 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) ctx->provctx = NULL; } - if (type != NULL) + if (type != NULL) { ctx->reqdigest = type; + } else { + if (ctx->digest == NULL) { + ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET); + return 0; + } + type = ctx->digest; + } /* TODO(3.0): Legacy work around code below. Remove this */ #if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE) @@ -292,12 +299,6 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) ctx->engine = impl; } else ctx->engine = NULL; - } else { - if (!ctx->digest) { - ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET); - return 0; - } - type = ctx->digest; } #endif if (ctx->digest != type) {
core/cortex-m0/irq_handler.h: Format with clang-format BRANCH=none TEST=none
task_end_irq_handler(ret); \ } \ const struct irq_priority __keep IRQ_PRIORITY(irq) \ - __attribute__((section(".rodata.irqprio"))) \ - = {irq, priority} + __attribute__((section(".rodata.irqprio"))) = { irq, \ + priority } #else /* CONFIG_TASK_PROFILING */ /* No Profiling : connect directly the IRQ vector */ #define DECLARE_IRQ_(irq, routine, priority) \ static void __keep routine(void); \ - void IRQ_HANDLER(irq)(void) __attribute__((alias(STRINGIFY(routine))));\ + void IRQ_HANDLER(irq)(void) \ + __attribute__((alias(STRINGIFY(routine)))); \ const struct irq_priority __keep IRQ_PRIORITY(irq) \ - __attribute__((section(".rodata.irqprio"))) \ - = {irq, priority} + __attribute__((section(".rodata.irqprio"))) = { irq, \ + priority } #endif /* CONFIG_TASK_PROFILING */ #endif /* __CROS_EC_IRQ_HANDLER_H */
Fix incorrect variable datatype. Since slot_keep_segs indicates the number of WAL segments not LSN, its datatype should not be XLogRecPtr. Back-patch to v13 where this issue was added. Reported-by: Atsushi Torikoshi Author: Atsushi Torikoshi, tweaked by Fujii Masao Discussion:
@@ -9601,7 +9601,7 @@ KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo) /* Cap by max_slot_wal_keep_size ... */ if (max_slot_wal_keep_size_mb >= 0) { - XLogRecPtr slot_keep_segs; + uint64 slot_keep_segs; slot_keep_segs = ConvertToXSegs(max_slot_wal_keep_size_mb, wal_segment_size);
Initialize PSA crypto in test_suite_x509write for RSA signing tests
@@ -93,6 +93,8 @@ void x509_csr_check( char * key_file, char * cert_req_check_file, int md_type, memset( &rnd_info, 0x2a, sizeof( mbedtls_test_rnd_pseudo_info ) ); + USE_PSA_INIT( ); + mbedtls_pk_init( &key ); TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL, mbedtls_test_rnd_std_rand, NULL ) == 0 ); @@ -140,6 +142,7 @@ void x509_csr_check( char * key_file, char * cert_req_check_file, int md_type, exit: mbedtls_x509write_csr_free( &req ); mbedtls_pk_free( &key ); + USE_PSA_DONE( ); } /* END_CASE */ @@ -220,6 +223,8 @@ void x509_crt_check( char *subject_key_file, char *subject_pwd, memset( &rnd_info, 0x2a, sizeof( mbedtls_test_rnd_pseudo_info ) ); mbedtls_mpi_init( &serial ); + USE_PSA_INIT( ); + mbedtls_pk_init( &subject_key ); mbedtls_pk_init( &issuer_key ); mbedtls_pk_init( &issuer_key_alt ); @@ -316,6 +321,7 @@ exit: mbedtls_pk_free( &subject_key ); mbedtls_pk_free( &issuer_key ); mbedtls_mpi_free( &serial ); + USE_PSA_DONE( ); } /* END_CASE */
in_windows_exporter_metrics: Fix brace styles
@@ -41,8 +41,7 @@ static int wmi_coinitialize(struct flb_we *ctx, char* wmi_namespace) /* Initialize COM library */ hr = CoInitializeEx(0, COINIT_MULTITHREADED); - if (FAILED(hr)) - { + if (FAILED(hr)) { flb_plg_error(ctx->ins, "Failed to initialize COM library. Error code = %x", hr); return -1; } @@ -65,8 +64,7 @@ static int wmi_coinitialize(struct flb_we *ctx, char* wmi_namespace) /* Create WMI instance */ hr = CoCreateInstance(&CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (LPVOID *) &locator); - if (FAILED(hr)) - { + if (FAILED(hr)) { flb_plg_error(ctx->ins, "Failed to create IWbemLocator object. Error code = %x", hr); CoUninitialize(); return hr; @@ -322,13 +320,11 @@ static int wmi_exec_query_fixed_val(struct flb_we *ctx, struct wmi_query_spec *s return -1; } - while (enumerator) - { + while (enumerator) { hr = enumerator->lpVtbl->Next(enumerator, WBEM_INFINITE, 1, &class_obj, &ret); - if(0 == ret) - { + if(0 == ret) { break; } @@ -358,13 +354,11 @@ static int wmi_exec_query(struct flb_we *ctx, struct wmi_query_spec *spec) return -1; } - while (enumerator) - { + while (enumerator) { hr = enumerator->lpVtbl->Next(enumerator, WBEM_INFINITE, 1, &class_obj, &ret); - if(0 == ret) - { + if(0 == ret) { break; }
input: on socket collector creation, return collector id
@@ -796,6 +796,7 @@ int flb_input_collector_running(int coll_id, struct flb_input_instance *in) return coll->running; } + int flb_input_pause_all(struct flb_config *config) { int paused = 0; @@ -942,7 +943,7 @@ int flb_input_set_collector_socket(struct flb_input_instance *in, mk_list_add(&collector->_head, &config->collectors); mk_list_add(&collector->_head_ins, &in->collectors); - return 0; + return collector->id; } int flb_input_collector_fd(flb_pipefd_t fd, struct flb_config *config)
component/bt: Unlock reserve of SCN 1 for HFP
@@ -1522,11 +1522,10 @@ UINT8 BTM_AllocateSCN(void) { UINT8 x; BTM_TRACE_DEBUG ("BTM_AllocateSCN\n"); - // stack reserves scn 1 for HFP, HSP we still do the correct way for (x = 1; x < BTM_MAX_SCN; x++) { - if (!btm_cb.btm_scn[x]) { - btm_cb.btm_scn[x] = TRUE; - return (x + 1); + if (!btm_cb.btm_scn[x - 1]) { + btm_cb.btm_scn[x - 1] = TRUE; + return x; } } return (0); /* No free ports */ @@ -1545,10 +1544,7 @@ UINT8 BTM_AllocateSCN(void) #if (CLASSIC_BT_INCLUDED == TRUE) BOOLEAN BTM_TryAllocateSCN(UINT8 scn) { - /* Make sure we don't exceed max port range. - * Stack reserves scn 1 for HFP, HSP we still do the correct way. - */ - if ( (scn >= BTM_MAX_SCN) || (scn == 1) ) { + if (scn >= BTM_MAX_SCN) { return FALSE; }
add 32bit gcc support to docker
FROM ubuntu:16.04 # system basics -RUN apt-get update -RUN apt-get -y install build-essential git curl python python-virtualenv python-dev +RUN apt-get update && apt-get -y install build-essential gcc-multilib g++-multilib lib32z1 git curl python python-virtualenv python-dev # qemu deps RUN apt-get -y install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev
first pass at docs update
@@ -49,9 +49,56 @@ HTTP.post("https://httpbin.org/post", {"test": 10}, ["Content-Type: application/ HTTP.post("https://httpbin.org/post", {"test": 10}, ["Content-Type: application/json"], 1); ``` +### HTTP.newClient(dict) + +Creates a new HTTP client with a given set of options. +Returns a Result and neecds to be unwraped upon success. + +```cs +const opts = { + "timeout": 20, + "headers": [ + "Content-Type: application/json", + "Accept: application/json", + "User-Agent: Dictu" + ], + "insecure": false, + "keyFile": "", + "certFile": "", + "keyPasswd": "" +}; +const ret = HTTP.newClient(opts); +if (not ret.success()) { + print(res.unwrapError()); + System.exit(1); +} +var httpClient = ret.unwrap(); +``` + +### httpClient.get(string) + +Sends a HTTP GET request to a given URL. +Returns a Result and unwraps to a Response upon success. + +```cs +httpClient.get("https://httpbin.org/get"); + +{"content": "...", "headers": ["...", "..."], "statusCode": 200} +``` + +### HTTP.post(string, dictionary: postArgs) + +Sends a HTTP POST request to a given URL. +Returns a Result and unwraps to a Response upon success. + +```cs +httpClient.post("https://httpbin.org/post"); +httpClient.post("https://httpbin.org/post", {"test": 10}); +``` + ### Response -Both HTTP.get() and HTTP.post() return a Result that unwraps a Response object on success, or nil on error. +Both HTTP.get(), HTTP.post(), httpClient.get(), and httpClient.post() return a Result that unwraps a Response object on success, or nil on error. The Response object returned has 3 public properties, "content", "headers" and "statusCode". "content" is the actual content returned from the HTTP request as a string, "headers" is a list of all the response headers and "statusCode" is a number denoting the status code from the response @@ -60,7 +107,7 @@ the response ##### Properties | Property | Description | -|------------|--------------------------------------------------------| +| ---------- | ------------------------------------------------- | | content | Raw string content returned from the HTTP request | | headers | A list of headers returned from the HTTP request | | statusCode | The status code returned from the HTTP request | @@ -68,7 +115,7 @@ the response ##### Methods | Method | Description | -|------------|--------------------------------------------------------| +| ------ | ------------------------------------ | | json | Convert the content property to JSON | Example response from [httpbin.org](https://httpbin.org)
bsp/nucleo-l476rg: Fix MOSI pin assignment While CLK and MISO are assigned to Arduino like pins, MOSI was assigned other valid value that could make it confusing.
@@ -88,7 +88,7 @@ struct stm32_hal_spi_cfg spi0_cfg = { .ss_pin = MCU_GPIO_PORTA(4), .sck_pin = MCU_GPIO_PORTA(5), .miso_pin = MCU_GPIO_PORTA(6), - .mosi_pin = MCU_GPIO_PORTB(5), + .mosi_pin = MCU_GPIO_PORTA(7), .irq_prio = 2, }; #endif
Increase battery reporting interval to reduce battery consumption
@@ -1173,9 +1173,9 @@ bool DeRestPluginPrivate::sendConfigureReportingRequest(BindingTask &bt) else if (sensor && (sensor->modelId().startsWith(QLatin1String("Lightify Switch Mini")) || // Osram 3 button remote sensor->modelId().startsWith(QLatin1String("Switch 4x EU-LIGHTIFY"))) ) // Osram 4 button remote { - rq.attributeId = 0x0020; // battery voltage - rq.minInterval = 3600; // 1 hour - rq.maxInterval = 3600; // 1 hour + rq.attributeId = 0x0020; + rq.minInterval = 21600; + rq.maxInterval = 21600; rq.reportableChange8bit = 0; } else if (sensor && (sensor->modelId().startsWith(QLatin1String("SMSZB-120")) || // Develco smoke sensor
libcupsfilters: Clean up "Kodak" manufacturer name Some Kodak printers/PPD files report "Eastman Kodak Company", others simply "Kodak" as manufacturer name. Let the ieee1284NormalizeMakeAndModel() function use simply "Kodak" here.
@@ -1028,6 +1028,26 @@ ieee1284NormalizeMakeAndModel( bufptr += 2; } + bufptr = buffer; + while ((bufptr = strcasestr(bufptr, "eastman kodak company")) != NULL && + (bufptr == buffer || !isalnum(*(bufptr - 1))) && + !isalnum(*(bufptr + 21))) + { + /* + * Replace with Kodak... + */ + + bufptr[0] = 'K'; + bufptr[1] = 'o'; + bufptr[2] = 'd'; + bufptr[3] = 'a'; + bufptr[4] = 'k'; + moverightpart(buffer, bufsize, bufptr + 5, -16); + if (modelptr >= bufptr + 21) + modelptr -= 16; + bufptr += 5; + } + bufptr = buffer; while ((bufptr = strcasestr(bufptr, "Lexmark International")) != NULL) {
CCode: Use `add_plugintest` instead of `add_gtest`
-if (DEPENDENCY_PHASE) - include (LibAddTest) - add_gtest (testmod_ccode - SOURCES ccode.cpp - coder.cpp - LINK_ELEKTRA elektra-kdb - elektra-plugin - INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}" # Required for `readme_ccode.c` - "${CMAKE_SOURCE_DIR}/src/bindings/cpp/tests") -endif (DEPENDENCY_PHASE) +if (ADDTESTING_PHASE) + add_plugintest (ccode CPP LINK_ELEKTRA elektra-kdb elektra-plugin) +endif (ADDTESTING_PHASE) add_plugin (ccode CPP SOURCES ccode.hpp ccode.cpp coder.hpp coder.cpp TEST_README TEST_REQUIRED_PLUGINS tcl base64)
Fix pip3 asymmetry
@@ -44,7 +44,7 @@ jobs: - name: Install Python module run: | pip3 install --user -r requirements.txt - pip3 uninstall --user -y project-generator + pip3 uninstall -y project-generator pip3 install --user git+https://github.com/mbrossard/project_generator.git@development - name: Install Embedded Arm Toolchain
Deal with BUF_MEM_grow ambiguity BUF_MEM_grow() returns the passed length, but also zero on error. If the passed length was zero, an extra check to see if a returned zero was an error or not is needed.
@@ -83,8 +83,15 @@ static int collect(BUF_MEM **collector, void *data, size_t datalen) } i = (*collector)->length; /* BUF_MEM_grow() changes it! */ - if (!BUF_MEM_grow(*collector, i + datalen)) + /* + * The i + datalen check is to distinguish between BUF_MEM_grow() + * signaling an error and BUF_MEM_grow() simply returning the (zero) + * length. + */ + if (!BUF_MEM_grow(*collector, i + datalen) + && i + datalen != 0) return 0; + if (data != NULL) memcpy((*collector)->data + i, data, datalen); return 1; }
fix missing prototype for heap_alloc_small
@@ -161,6 +161,7 @@ mi_decl_export mi_decl_allocator void* mi_heap_malloc(mi_heap_t* heap, size_t si mi_decl_export mi_decl_allocator void* mi_heap_zalloc(mi_heap_t* heap, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2); mi_decl_export mi_decl_allocator void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(2, 3); mi_decl_export mi_decl_allocator void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size2(2, 3); +mi_decl_export mi_decl_allocator void* mi_heap_malloc_small(mi_heap_t* heap, size_t size) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(2); mi_decl_export char* mi_heap_strdup(mi_heap_t* heap, const char* s) mi_attr_noexcept; mi_decl_export char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n) mi_attr_noexcept;
hammer: Fix moonball touchpad settings Fix the dimensions to pass firmware test. BRANCH=kukui TEST=emerge-kukui chromeos-ec
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (64*1024) #elif defined(BOARD_MOONBALL) #define HAS_I2C_TOUCHPAD -#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 2926 -#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1441 +#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 2925 +#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1440 #define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511 -#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 950 /* tenth of mm */ -#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 480 /* tenth of mm */ +#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 928 /* tenth of mm */ +#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 457 /* tenth of mm */ #define CONFIG_TOUCHPAD_VIRTUAL_SIZE (56*1024) #elif defined(BOARD_STAFF) #define HAS_I2C_TOUCHPAD
ambassador: Update fan and thermal settings. TEST=Built the EC firmware Tested-by: Neill Corlett
@@ -363,9 +363,9 @@ const struct fan_conf fan_conf_0 = { }; const struct fan_rpm fan_rpm_0 = { - .rpm_min = 1900, - .rpm_start = 2400, - .rpm_max = 4300, + .rpm_min = 2500, + .rpm_start = 2500, + .rpm_max = 5200, }; const struct fan_t fans[] = { @@ -385,16 +385,16 @@ BUILD_ASSERT(ARRAY_SIZE(mft_channels) == MFT_CH_COUNT); const static struct ec_thermal_config thermal_a = { .temp_host = { [EC_TEMP_THRESH_WARN] = 0, - [EC_TEMP_THRESH_HIGH] = C_TO_K(68), - [EC_TEMP_THRESH_HALT] = C_TO_K(78), + [EC_TEMP_THRESH_HIGH] = C_TO_K(78), + [EC_TEMP_THRESH_HALT] = C_TO_K(85), }, .temp_host_release = { [EC_TEMP_THRESH_WARN] = 0, - [EC_TEMP_THRESH_HIGH] = C_TO_K(58), + [EC_TEMP_THRESH_HIGH] = C_TO_K(70), [EC_TEMP_THRESH_HALT] = 0, }, - .temp_fan_off = C_TO_K(41), - .temp_fan_max = C_TO_K(72), + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(84), }; const static struct ec_thermal_config thermal_b = {
Fix type in pluto_matrix_intercnage_rows, move to C99/ C++11. Fix formatting
@@ -112,7 +112,8 @@ void pluto_matrix_resize(PlutoMatrix *mat, int nrows, int ncols) { } for (i = 0; i < alloc_nrows; i++) { - mat->val[i] = (int64_t *)realloc(mat->val[i], alloc_ncols * sizeof(int64_t)); + mat->val[i] = + (int64_t *)realloc(mat->val[i], alloc_ncols * sizeof(int64_t)); } mat->alloc_nrows = alloc_nrows; @@ -204,10 +205,10 @@ void pluto_matrix_add_row(PlutoMatrix *mat, int pos) { } void pluto_matrix_interchange_rows(PlutoMatrix *mat, int r1, int r2) { - int tmp, j; + /* int tmp, j; */ - for (j = 0; j < mat->ncols; j++) { - tmp = mat->val[r1][j]; + for (int j = 0; j < mat->ncols; j++) { + int64_t tmp = mat->val[r1][j]; mat->val[r1][j] = mat->val[r2][j]; mat->val[r2][j] = tmp; } @@ -537,7 +538,6 @@ void pluto_matrix_reverse_rows(PlutoMatrix *mat) { } } - /* * Pretty prints a one-dimensional affine function * ndims: number of variables @@ -595,7 +595,8 @@ void pluto_affine_function_print(FILE *fp, int64_t *func, int ndims, } /* Returned string should be freed with malloc */ -char *pluto_affine_function_sprint(int64_t *func, int ndims, const char **vars) { +char *pluto_affine_function_sprint(int64_t *func, int ndims, + const char **vars) { char *var[ndims], *out; int j, n; @@ -652,7 +653,6 @@ char *pluto_affine_function_sprint(int64_t *func, int ndims, const char **vars) return out; } - /* * Is row r1 of mat1 parallel to row r2 of mat2 */
dev-tools/hwloc: update tarball URL for 2.x series
@@ -19,7 +19,7 @@ Summary: Portable Hardware Locality License: BSD-3-Clause Group: %{PROJ_NAME}/dev-tools Url: http://www.open-mpi.org/projects/hwloc/ -Source0: https://www.open-mpi.org/software/hwloc/v1.11/downloads/%{pname}-%{version}.tar.bz2 +Source0: https://download.open-mpi.org/release/hwloc/v2.0/%{pname}-%{version}.tar.bz2 Source2: LICENSE
bootloader_support: fix uart1 no printing in the 2nd bootloader stage
@@ -61,6 +61,9 @@ void bootloader_console_init(void) const int uart_tx_gpio = CONFIG_ESP_CONSOLE_UART_TX_GPIO; const int uart_rx_gpio = CONFIG_ESP_CONSOLE_UART_RX_GPIO; + // Switch to the new UART (this just changes UART number used for esp_rom_printf in ROM code). + esp_rom_uart_set_as_console(uart_num); + // If console is attached to UART1 or if non-default pins are used, // need to reconfigure pins using GPIO matrix if (uart_num != 0 ||
Added HINTERRUPT_CALLBACK for hint callback method + cleanup
#define ROM_SIZE ((ROM_END + ROM_ALIGN_MASK) & (~ROM_ALIGN_MASK)) +#define HINTERRUPT_CALLBACK __attribute__ ((interrupt)) void + + // exist through rom_head.c typedef struct { @@ -68,6 +71,7 @@ typedef enum ON_VBLANK_START /** Start VBlank process on VBlank *start* period, means that we wait the next *start* of VBlank period if we missed it */ } VBlankProcessTime; + /** * \brief * Bus error interrupt callback. @@ -330,12 +334,17 @@ void SYS_setVBlankCallback(VoidCallback *CB); void SYS_setVIntCallback(VoidCallback *CB); /** * \brief - * Set 'Horizontal Interrupt' callback method. + * Set 'Horizontal Interrupt' callback method (need to be prefixed by HINTERRUPT_CALLBACK). * * \param CB * Pointer to the method to call on Horizontal Interrupt.<br> - * You can remove current callback by passing a null pointer here. - * + * You can remove current callback by passing a NULL pointer here.<br> + * You need to prefix your hint method with <i>HINTERRUPT_CALLBACK</i>:<br> + * <p>HINTERRUPT_CALLBACK myHIntFunction() + * { + * ... + * }</p> + * <br> * Horizontal interrupt happen at the end of scanline display period right before Horizontal blank.<br> * This period is usually used to do mid frame changes (palette, scrolling or others raster effect).<br> * When you do that, don't forget to protect your VDP access from your main loop using @@ -354,27 +363,6 @@ void SYS_setHIntCallback(VoidCallback *CB); */ void SYS_setExtIntCallback(VoidCallback *CB); -/** - * \deprecated - * Use #SYS_isInVInt() instead - */ -u16 SYS_isInVIntCallback(); -/** - * \deprecated - * Always return 0 now, you need to use your own flag to detect if you are processing a Horizontal interrupt - */ -u16 SYS_isInHIntCallback(); -/** - * \deprecated - * Always return 0 now, you need to use your own flag to detect if you are processing an External interrupt - */ -u16 SYS_isInExtIntCallback(); -/** - * \deprecated - * Use #SYS_isInVInt() instead, only vertical interrupt supported now - */ -u16 SYS_isInInterrupt(); - /** * \brief * Return TRUE if we are in the V-Interrupt process. @@ -383,17 +371,6 @@ u16 SYS_isInInterrupt(); */ bool SYS_isInVInt(); -/** - * \deprecated - * Not anymore useful as #SYS_doVBlankProcess() handle that directly now - */ -void SYS_setVIntAligned(bool value); -/** - * \deprecated - * Not anymore useful as #SYS_doVBlankProcess() handle that directly now - */ -bool SYS_isVIntAligned(); - /** * \brief * Return != 0 if we are on a NTSC system.
fuzz: feedback log
@@ -427,12 +427,12 @@ static void fuzz_perfFeedback(honggfuzz_t * hfuzz, fuzzer_t * fuzzer) hfuzz->linux.hwCnts.softCntCmp += softCntCmp; if (hfuzz->useScreen) { - LOG_I("NEW, size:%zu (insns,brs,edgs,pcs,hw,cmp): %" PRIu64 "/%" + LOG_I("NEW, size:%zu (i,b,edgs,ips,hw,cmp): %" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64, fuzzer->dynamicFileSz, fuzzer->linux.hwCnts.cpuInstrCnt, fuzzer->linux.hwCnts.cpuBranchCnt, softCntEdge, softCntPc, fuzzer->linux.hwCnts.newBBCnt, softCntCmp); } else { - LOG_I("NEW, size:%zu (i,b,sw,hw,cmp): %" PRIu64 "/%" + LOG_I("NEW, size:%zu (i,b,edgs,ips,hw,cmp): %" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 ", Tot:%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64 "/%" PRIu64, fuzzer->dynamicFileSz, fuzzer->linux.hwCnts.cpuInstrCnt,
BugID:18726380:Add ble buf null check
@@ -246,7 +246,9 @@ struct net_buf *net_buf_get(struct k_fifo *fifo, s32_t timeout) } /* Mark the end of the fragment list */ + if (frag) { frag->frags = NULL; + } return buf; } @@ -305,7 +307,9 @@ struct net_buf *net_buf_slist_get(sys_slist_t *list) } /* Mark the end of the fragment list */ + if (frag) { frag->frags = NULL; + } return buf; }
Ignore any unmapped (non-POR) DCPMMs, allowing goal creation for the remaining DCPMMs in POR config.
@@ -1744,7 +1744,7 @@ VerifyCreatingSupportedRegionConfigs( pDimm = DIMM_FROM_NODE(pDimmNode); if (Socket == pDimm->SocketId) { - if (!IsDimmManageable(pDimm)) { + if (!IsDimmManageable(pDimm) || !IsDimmInSupportedConfig(pDimm)) { continue; } @@ -1762,7 +1762,7 @@ VerifyCreatingSupportedRegionConfigs( /** Get a number of specified configured and unconfigured DIMMs on a given socket **/ for (Index = 0; Index < DimmsNum; Index++) { if (Socket == pDimms[Index]->SocketId) { - if (!IsDimmManageable(pDimms[Index])) { + if (!IsDimmManageable(pDimms[Index]) || !IsDimmInSupportedConfig(pDimms[Index])) { continue; }
config_tool: bdf of ioport serial port Little fix: bdf format of inport serial port in board_inspector.
@@ -94,7 +94,7 @@ def dump_ttys_info(ttys_list, config): base = read_ttys_node(base_path) try: b = get_bdf_from_realpath(os.path.join(TTY_PATH, ttys_n, 'device')) - bdf = f'{b[0]}:{b[1]}.{b[2]} + bdf = f'{b[0]}:{b[1]}.{b[2]}' except AssertionError: bdf = '' if bdf:
dpdk: fix rss configuration error issue Reorder foreach_dpdk_rss_hf to fix rss configuration error issue.
_ (rx_errors, q_errors) #define foreach_dpdk_rss_hf \ - _(ETH_RSS_IPV4, "ipv4") \ _(ETH_RSS_FRAG_IPV4, "ipv4-frag") \ _(ETH_RSS_NONFRAG_IPV4_TCP, "ipv4-tcp") \ _(ETH_RSS_NONFRAG_IPV4_UDP, "ipv4-udp") \ _(ETH_RSS_NONFRAG_IPV4_SCTP, "ipv4-sctp") \ _(ETH_RSS_NONFRAG_IPV4_OTHER, "ipv4-other") \ - _(ETH_RSS_IPV6, "ipv6") \ + _(ETH_RSS_IPV4, "ipv4") \ + _(ETH_RSS_IPV6_TCP_EX, "ipv6-tcp-ex") \ + _(ETH_RSS_IPV6_UDP_EX, "ipv6-udp-ex") \ _(ETH_RSS_FRAG_IPV6, "ipv6-frag") \ _(ETH_RSS_NONFRAG_IPV6_TCP, "ipv6-tcp") \ _(ETH_RSS_NONFRAG_IPV6_UDP, "ipv6-udp") \ _(ETH_RSS_NONFRAG_IPV6_SCTP, "ipv6-sctp") \ _(ETH_RSS_NONFRAG_IPV6_OTHER, "ipv6-other") \ - _(ETH_RSS_IPV6_TCP_EX, "ipv6-tcp-ex") \ - _(ETH_RSS_IPV6_UDP_EX, "ipv6-udp-ex") \ - _(ETH_RSS_L2_PAYLOAD, "l2-payload") \ _(ETH_RSS_IPV6_EX, "ipv6-ex") \ - _(ETH_RSS_IPV6_TCP_EX, "ipv6-tcp-ex") \ - _(ETH_RSS_IPV6_UDP_EX, "ipv6-udp-ex") \ + _(ETH_RSS_IPV6, "ipv6") \ + _(ETH_RSS_L2_PAYLOAD, "l2-payload") \ _(ETH_RSS_PORT, "port") \ _(ETH_RSS_VXLAN, "vxlan") \ _(ETH_RSS_GENEVE, "geneve") \
Grr fixed another line assembly bug
@@ -240,7 +240,7 @@ namespace MiningCore.Stratum // fastpath if (index + 1 == bufferSize && recvQueue.Count == 0) { - observer.OnNext(new PooledArraySegment<byte>(buf, prevIndex, index)); + observer.OnNext(new PooledArraySegment<byte>(buf, prevIndex, index - prevIndex)); keepLease = true; break; }
Add notes on project paths
It is backed by [libuv][http://libuv.org/] to implement IO functionality, and is a work in progress. +## To build the Wren CLI + +### Windows + +The `projects/vs20xx` folders contain Visual Studio projects. + +### macOS + +The `projects/xcode` folder contains an Xcode project. + +### Linux + +The `projects/gmake` folder contains a `make` project. +From that folder, run make. + +`cd projects/gmake` +`make` + +## Alternative build options + +The projects are generated by `projects/premake`. +You can use premake5 (alpha 14 was used) to generate other projects. + +--- + ## Wren is a small, fast, class-based concurrent scripting language Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in
parallel-libs/boost: bump to v1.66.0
Summary: Boost free peer-reviewed portable C++ source libraries Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} -Version: 1.65.1 +Version: 1.66.0 -%define version_exp 1_65_1 +%define version_exp 1_66_0 Release: 1%{?dist} License: BSL-1.0 Group: %{PROJ_NAME}/parallel-libs Url: http://www.boost.org -Source0: http://sourceforge.net/projects/boost/files/boost/%{version}/boost_%{version_exp}.tar.gz +Source0: https://dl.bintray.com/boostorg/release/%{version}/source/boost_%{version_exp}.tar.gz Source1: boost-rpmlintrc Source2: mkl_boost_ublas_gemm.hpp Source3: mkl_boost_ublas_matrix_prod.hpp
actions FEATURE install uncrustify for a single build
@@ -73,6 +73,19 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Uncrustify + shell: bash + working-directory: ${{ github.workspace }} + run: | + git clone --branch uncrustify-0.71.0 https://github.com/uncrustify/uncrustify + cd uncrustify + mkdir build + cd build + CC=${{ matrix.config.cc }} cmake .. + make + sudo make install + if: ${{ matrix.config.name == 'Debug, Ubuntu 18.04, gcc' }} + - name: Dependencies shell: bash run: |
Cleaned up .gitignore Still contained all the cups-filters entries from before the splitting of the repositories.
@@ -38,37 +38,20 @@ m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -filter/braille/filters/liblouis*.defs -filter/braille/drivers/generic/brftoembosser -filter/braille/drivers/index/imageubrltoindexv[34] -filter/braille/drivers/index/index.sh -filter/braille/drivers/index/indexv[34].sh -filter/braille/drivers/index/textbrftoindexv3 -filter/braille/filters/brftopagedbrf -filter/braille/filters/cups-braille.sh -filter/braille/filters/imagetobrf -filter/braille/filters/liblouis1.defs.gen -filter/braille/filters/musicxmltobrf -filter/braille/filters/texttobrf -filter/braille/filters/vectortobrf -filter/braille/filters/vectortopdf -filter/foomatic-rip/foomatic-rip.1 mime/cupsfilters.convs -utils/cups-browsed -utils/cups-browsed.conf -cups-notifier.c -cups-notifier.h +utils/driverless-fax beh -cups-brf -implicitclass parallel serial bannertopdf commandtoescpx commandtopclx foomatic-rip +gstopdf +gstopxl gstoraster imagetopdf +imagetops imagetoraster mupdftopwg pclmtoraster @@ -77,40 +60,28 @@ pdftoopvp pdftopdf pdftops pdftoraster -pwgtoraster pstops +pwgtopclm +pwgtopdf +pwgtoraster rastertoescpx rastertopclx -pwgtopdf rastertops rastertopwg texttopdf texttotext -cups-browsed -driverless -test_analyze -test_pdf -test_pdf1 -test_pdf2 -test_ps -test1284 -testcmyk -testdither -testimage -testrgb universal +driverless +test-external .vscode/ #files generated by ./autogen.sh ./configure && make ABOUT-NLS -backend/.dirstamp config.rpath -cupsfilters/.dirstamp +backend/.dirstamp filter/.dirstamp -fontembed/.dirstamp -gstopdf -gstopxl -imagetops +ppdfiles/.dirstamp +utils/.dirstamp m4/codeset.m4 m4/extern-inline.m4 m4/fcntl-o.m4 @@ -143,7 +114,3 @@ m4/visibility.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xsize.m4 -ppd/.dirstamp -pwgtopclm -utils/.dirstamp -utils/driverless-fax
Shutdown messages v.2
@@ -642,8 +642,7 @@ static void facil_init_run(void *arg, void *arg2) { } static void facil_cleanup(void *arg) { - if (FACIL_PRINT_STATE && facil_data->parent == getpid()) - fprintf(stderr, "\n --- starting shutdown ---\n"); + fprintf(stderr, "* %d cleanning up.\n", getpid()); intptr_t uuid; for (size_t i = 0; i < facil_data->capacity; i++) { if (fd_data(i).protocol && (uuid = sock_fd2uuid(i)) >= 0) { @@ -655,7 +654,6 @@ static void facil_cleanup(void *arg) { facil_cycle(arg, NULL); ((struct facil_run_args *)arg)->on_finish(); defer_perform(); - fprintf(stderr, "* %d finished.\n", getpid()); } #undef facil_run @@ -690,6 +688,8 @@ void facil_run(struct facil_run_args args) { } else if (frk > 0) { exit(0); } + if (FACIL_PRINT_STATE) + fprintf(stderr, "\n --- Completed Shutdown ---\n"); } /* ***************************************************************************** Setting the protocol
Add _sceAppMgrGetCoredumpStateForShell
@@ -531,6 +531,29 @@ int _sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292] */ int sceAppMgrGetBudgetInfo(SceAppMgrBudgetInfo *info); +typedef struct SceAppMgrCoredumpState { + SceUID pid; + int process_state; + int progress; // 0-100 + int is_coredump_completed; + int data_0x10; + SceSize path_len; + char path[0x400]; + int data_0x418; + int data_0x41C; + int data_0x420; + int data_0x424; +} SceAppMgrCoredumpState; + +/** + * Get current coredump state for shell + * + * @param[out] state - state info output. + * + * @return 0 on success, < 0 on error. + */ +int _sceAppMgrGetCoredumpStateForShell(SceAppMgrCoredumpState *state); + #ifdef __cplusplus } #endif
Small adjustments to render_mango
@@ -1237,7 +1237,7 @@ void render_mango(swapchain_stats& data, struct overlay_params& params, ImVec2& } ImGui::EndTable(); if (params.enabled[OVERLAY_PARAM_ENABLED_frame_timing]){ - ImGui::Dummy(ImVec2(0.0f, params.font_size * params.font_scale / 2)); + ImGui::Dummy(ImVec2(0.0f, 8.0f)); ImGui::PushFont(data.font1); ImGui::TextColored(data.colors.engine, "%s", "Frametime"); ImGui::PopFont(); @@ -1258,7 +1258,7 @@ void render_mango(swapchain_stats& data, struct overlay_params& params, ImVec2& ImGui::PopStyleColor(); } ImGui::End(); - window_size = ImVec2(window_size.x, ImGui::GetCursorPosY() + 150.0f); + window_size = ImVec2(window_size.x, 200); } void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, bool is_vulkan)
board/servo_v4p1/usb_sm.c: Format with clang-format BRANCH=none TEST=none
@@ -115,8 +115,8 @@ void set_state(const int port, struct sm_ctx *const ctx, * intended state to transition into. */ if (internal->exit) { - CPRINTF("C%d: Ignoring set state to 0x%pP within 0x%pP", - port, new_state, ctx->current); + CPRINTF("C%d: Ignoring set state to 0x%pP within 0x%pP", port, + new_state, ctx->current); return; }
Change some section names
@@ -16,7 +16,7 @@ The changes are detailed below, and include: - Removal of functions previously marked as deprecated. -## Tooling +## General changes ### Introduce a level of indirection and versioning in the config files @@ -493,7 +493,7 @@ names provided by the 1.0 specification instead. -## The ALT interface +## Changes that only affect alternative implementations ### Internal / alt-focused headers were moved to a private location
Update README.txt Added CI badge to readme
+<img src="https://github.com/KCL-BMEIS/niftyreg/blob/master/logo/nifty_reg_logo.png" alt="NiftyReg logo" title="NiftyReg" align="centre" height="80" /> + +[![License](https://img.shields.io/github/license/KCL-BMEIS/NiftyReg)](https://github.com/KCL-BMEIS/niftyreg/blob/master/LICENSE.txt) +[![GitHub Actions](https://img.shields.io/github/checks-status/KCL-BMEIS/niftyreg/master)](https://github.com/KCL-BMEIS/niftyreg/actions) + ##################### # NIFTY_REG PACKAGE # #####################
af_packet: support changing the mtu size Added support to the af_packet device to change the MTU size.
#include <linux/if_ether.h> #include <linux/if_packet.h> #include <dirent.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <fcntl.h> #include <vlib/vlib.h> #include <vlib/unix/unix.h> @@ -61,7 +64,26 @@ static u32 af_packet_eth_flag_change (vnet_main_t * vnm, vnet_hw_interface_t * hi, u32 flags) { - /* nothing for now */ + clib_error_t *error; + u8 *s; + af_packet_main_t *apm = &af_packet_main; + af_packet_if_t *apif = + pool_elt_at_index (apm->interfaces, hi->dev_instance); + + if (ETHERNET_INTERFACE_FLAG_MTU == (flags & ETHERNET_INTERFACE_FLAG_MTU)) + { + s = format (0, "/sys/class/net/%s/mtu%c", apif->host_if_name, 0); + + error = vlib_sysfs_write ((char *) s, "%d", hi->max_packet_bytes); + vec_free (s); + + if (error) + { + clib_error_report (error); + return VNET_API_ERROR_SYSCALL_ERROR_1; + } + } + return 0; }
libhfnetdriver: comments, remove some includes
-#include <dlfcn.h> #include <errno.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <stdbool.h> #include <stdint.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> @@ -224,9 +222,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) { PLOG_F("send(sock=%d, len=%zu) failed", sock, len); } /* - * Indicate the end of input to the TCP server + * Indicate EOF (via the FIN flag) to the TCP server * - * Well-behaved TCP servers should process the input, or close the TCP connection at this point + * Well-behaved TCP servers should process the input and responsd/close the TCP connection at + * this point */ if (TEMP_FAILURE_RETRY(shutdown(sock, SHUT_WR)) == -1) { if (errno == ENOTCONN) {
bin: adjust banner
@@ -194,7 +194,7 @@ static void flb_version() static void flb_banner() { - fprintf(stderr, "%sFluent-Bit v%s%s\n", + fprintf(stderr, "%sFluent Bit v%s%s\n", ANSI_BOLD, FLB_VERSION_STR, ANSI_RESET); fprintf(stderr, "%sCopyright (C) Treasure Data%s\n\n", ANSI_BOLD ANSI_YELLOW, ANSI_RESET);
Add implementation of GetCustomAttributes for fields
@@ -125,7 +125,82 @@ HRESULT Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributes__ { NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + CLR_RT_HeapBlock* callerField; + CLR_RT_HeapBlock* returnArray = NULL; + CLR_RT_FieldDef_Instance fieldDefinition; + int count = 0; + + // put the return array on the stack + CLR_RT_HeapBlock& top = stack.PushValueAndClear(); + + // get the caller field + callerField = stack.Arg0().Dereference(); + + NANOCLR_CHECK_HRESULT(Library_corlib_native_System_Reflection_RuntimeFieldInfo::GetFieldDescriptor( stack, *callerField, fieldDefinition )); + + // setup attribute enumerator + CLR_RT_AttributeEnumerator attributeEnumerator; + attributeEnumerator.Initialize( fieldDefinition ); + + // 1st pass: count attributes + do + { + // move to the next attribute in the collection, if any + if(attributeEnumerator.Advance()) + { + count++; + } + else + { + // done sweeping attributes + + // create the result array + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, count, g_CLR_RT_WellKnownTypes.m_TypeStatic )); + + // use this to skip the 2nd pass if no attribute was found + if (count == 0) break; + + // get the pointer to the first element + returnArray = (CLR_RT_HeapBlock*)top.DereferenceArray()->GetFirstElement(); + + // reset attribute enumerator + attributeEnumerator.Initialize( fieldDefinition ); + + break; + } + } + while(true); + + // 2nd pass: fill the array with the attributes types, if any + while(count > 0) + { + // move to the next attribute in the collection, if any + if(attributeEnumerator.Advance()) + { + CLR_RT_TypeDef_Instance instanceTypeDef; + CLR_RT_HeapBlock* hbObj; + + // get the type def for the current attribute + attributeEnumerator.GetCurrent(&instanceTypeDef); + + CLR_RT_TypeDef_Index attributeType; + attributeType.Set(instanceTypeDef.Assembly(), instanceTypeDef.Type()); + + // create a new object for the attribute type and put it on the return array + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*returnArray, g_CLR_RT_WellKnownTypes.m_TypeStatic)); + hbObj = returnArray->Dereference(); + // make sure the reflection is pointing to the attribute type + hbObj->SetReflection( attributeType ); + + returnArray++; + count--; + } + else + { + // no more attributes + break; + } + } NANOCLR_NOCLEANUP(); }
os/arch/arm/src/armv7-m/up_assert: Add system block feature Add system block feature for armv7-m architecture. This patch adds the feature to block the system if any kind of fault occurs in the system. When this feature is enabled system will be blocked and can be debug through T32.
@@ -457,8 +457,10 @@ static void _up_assert(int errorcode) } #else +#ifndef CONFIG_BOARD_ASSERT_SYSTEM_BLOCK /* Are we in an interrupt handler or the idle task? */ if (current_regs || (this_task())->pid == 0) { +#endif (void)irqsave(); for (;;) { #ifdef CONFIG_ARCH_LEDS @@ -468,10 +470,12 @@ static void _up_assert(int errorcode) up_mdelay(250); #endif } +#ifndef CONFIG_BOARD_ASSERT_SYSTEM_BLOCK } else { exit(errorcode); } #endif +#endif } /**************************************************************************** @@ -524,7 +528,7 @@ void up_assert(const uint8_t *filename, int lineno) } #endif -#ifndef CONFIG_BINMGR_RECOVERY +#if !defined(CONFIG_BINMGR_RECOVERY) && !defined(CONFIG_BOARD_ASSERT_SYSTEM_BLOCK) up_dumpstate(); #endif
use rev for flip
++ flip |= b=byts ^- byts - :- wid.b - %+ lsh [3 (sub wid.b (met 3 dat.b))] - (swp 3 dat.b) + [wid.b (rev 3 b)] :: Converts a list of bits to a list of n-bit numbers :: input-bits should be big-endian ::
ssc: fix undefined variable
@@ -1180,6 +1180,8 @@ def halomod_Tk3D_SSC(cosmo, hmc, dpk12[ia, :] = norm12*((2.2380952381-dpk/3)*i11_1*i11_2*pk+i12_12) dpk34[ia, :] = norm34*((2.2380952381-dpk/3)*i11_3*i11_4*pk+i12_34) + # Defining i02_12 here to avoid problems in L1205 in some plataforms + i02_12 = None # Counter terms for clustering (i.e. - (bA + bB) * PAB if prof1.is_number_counts or (prof2 is None or prof2.is_number_counts): b1 = b2 = np.zeros_like(k_use)
Fix a spell mistake After commented default portable option in `app/meson.build` get some error and then find this. :)
#define SOCKET_NAME "scrcpy" #define SERVER_FILENAME "scrcpy-server.jar" -#define DEFAULT_SERVER_PATH PREFIX "/share/scrcpy/" SERVER_FLENAME +#define DEFAULT_SERVER_PATH PREFIX "/share/scrcpy/" SERVER_FILENAME #define DEVICE_SERVER_PATH "/data/local/tmp/" SERVER_FILENAME static const char *
u3: removes redundant byte-array allocation in u3s_cue_xeno
@@ -629,17 +629,24 @@ _cs_cue_xeno_next(_cue_stack_t* tac_u, // XX need a ur_bsr_words_any() // else { - c3_d byt_d = (len_d >> 3) + !!ur_mask_3(len_d); + c3_w* wor_w; c3_y* byt_y; - // XX check that byt_d fits in a c3_w; - // - byt_y = c3_calloc(byt_d); - ur_bsr_bytes_any(red_u, len_d, byt_y); + { + c3_d byt_d = (len_d >> 3) + !!ur_mask_3(len_d); + + if ( 0xffffffffULL < byt_d) { + return u3m_bail(c3__meme); + } - *out = u3i_bytes(byt_d, byt_y); + // XX assumes little-endian + // + wor_w = u3a_slaq(3, byt_d); + byt_y = (c3_y*)wor_w; + } - c3_free(byt_y); + ur_bsr_bytes_any(red_u, len_d, byt_y); + *out = u3a_malt(wor_w); } ur_dict32_put(rot_u, dic_u, bit_d, *out);
sdl/hints: Add Windows hints for SDL2 2.0.6
@@ -10,6 +10,8 @@ package sdl #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "" #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "" #define SDL_HINT_TOUCH_MOUSE_EVENTS "" +#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "" +#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "" #endif #if !(SDL_VERSION_ATLEAST(2,0,4)) @@ -102,6 +104,8 @@ const ( HINT_MOUSE_NORMAL_SPEED_SCALE = C.SDL_HINT_MOUSE_NORMAL_SPEED_SCALE // specifies a variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode HINT_MOUSE_RELATIVE_SPEED_SCALE = C.SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE // specifies a variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode HINT_TOUCH_MOUSE_EVENTS = C.SDL_HINT_TOUCH_MOUSE_EVENTS // specifies a variable controlling whether touch events should generate synthetic mouse events + HINT_WINDOWS_INTRESOURCE_ICON = C.SDL_HINT_WINDOWS_INTRESOURCE_ICON // specifies a variable to specify custom icon resource id from RC file on Windows platform + HINT_WINDOWS_INTRESOURCE_ICON_SMALL = C.SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL // specifies a variable to specify custom icon resource id from RC file on Windows platform ) // An enumeration of hint priorities.
net/usrsock: Split NET_USRSOCK_OTHER to NET_USRSOCK_ICMP[v6]
@@ -49,8 +49,14 @@ config NET_USRSOCK_TCP default n select NET_TCP_NO_STACK -config NET_USRSOCK_OTHER - bool "Enable other protocol families in addition of INET & INET6" +config NET_USRSOCK_ICMP + bool "User-space daemon provides ICMP sockets" + select NET_ICMP_NO_STACK + default n + +config NET_USRSOCK_ICMPv6 + bool "User-space daemon provides ICMPv6 sockets" + select NET_ICMPv6_NO_STACK default n endif # NET_USRSOCK
Locale/language bug fix in pe module for Windows Related to bugfix in commit Building on Windows causes bug regression despite of commit
@@ -2452,7 +2452,7 @@ define_function(locale) for (i = 0; i < n; i++) { uint64_t rsrc_language = get_integer( - module, "resources[%" PRIi32 "].language", (int32_t)i); + module, "resources[%i].language", (int32_t)i); if ((rsrc_language & 0xFFFF) == locale) return_integer(1); @@ -2483,7 +2483,7 @@ define_function(language) for (i = 0; i < n; i++) { uint64_t rsrc_language = get_integer( - module, "resources[%" PRIi32 "].language", (int32_t)i); + module, "resources[%i].language", (int32_t)i); if ((rsrc_language & 0xFF) == language) return_integer(1);
Retry sending data on a broken connection.
@@ -982,19 +982,17 @@ run_ipp_usb_to_host( { if (poll(&poll_data, 1, 1000) > 0) { - papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOHOST%d: Reading from socket %d.", iface->number, iface->ipp_sock); +// papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOHOST%d: Reading from socket %d.", iface->number, iface->ipp_sock); if ((bytes = read(iface->ipp_sock, buffer, sizeof(buffer))) > 0) { - papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOHOST%d: Sending %d bytes.", iface->number, (int)bytes); + papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOHOST%d: Returning %d bytes.", iface->number, (int)bytes); if (write(iface->ipp_to_host, buffer, (size_t)bytes) < 0) { - papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_ERROR, "TOHOST%d: Error sending data to host: %s", iface->number, strerror(errno)); + papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_ERROR, "TOHOST%d: Error returning data to host: %s", iface->number, strerror(errno)); break; } - else - papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOHOST%d: Success", iface->number); } else if (bytes < 0) { @@ -1045,6 +1043,8 @@ run_ipp_usb_to_printer( while (!iface->printer->is_deleted && iface->printer->system->is_running) { if ((bytes = read(iface->ipp_to_printer, buffer, sizeof(buffer))) > 0) + { + do { if (iface->ipp_sock < 0) { @@ -1062,13 +1062,17 @@ run_ipp_usb_to_printer( } } - papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOPRINTER%d: Writing %d bytes to socket %d.", iface->number, (int)bytes, iface->ipp_sock); + papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_DEBUG, "TOPRINTER%d: Sending %d bytes to socket %d.", iface->number, (int)bytes, iface->ipp_sock); if (write(iface->ipp_sock, buffer, (size_t)bytes) < 0) { - papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_ERROR, "TOPRINTER%d: Unable to write data to socket: %s", iface->number, strerror(errno)); - break; + papplLogPrinter(iface->printer, PAPPL_LOGLEVEL_ERROR, "TOPRINTER%d: Unable to send data to socket: %s", iface->number, strerror(errno)); + pthread_cancel(iface->host_thread); + close(iface->ipp_sock); + iface->ipp_sock = -1; + } } + while (iface->ipp_sock < 0); } }
Remove obsolete options.
@@ -15,8 +15,6 @@ use "syssel" const main = {args : byte[:][:] var b : bld.build# - var cleanfirst - var dumponly var bintarg var targname var runsrc @@ -28,8 +26,6 @@ const main = {args : byte[:][:] cmd = std.optparse(args, &[ .argdesc = "[inputs...]", .opts = [ - [.opt='c', .desc="clean before building"], - [.opt='T', .desc="list all available targets"], [.opt='t', .arg="tag", .desc="build with specified systag"], [.opt='S', .desc="generate assembly when building"], [.opt='d', .desc="dump debugging information for mbld"], @@ -47,16 +43,12 @@ const main = {args : byte[:][:] tags = [][:] runsrc = "" targname = "" - dumponly = false - cleanfirst = false ok = true bld.initopts() for opt in cmd.opts match opt - | ('T', ""): dumponly = true | ('S', ""): bld.opt_genasm = true - | ('c', ""): cleanfirst = true | ('I', arg): std.slpush(&bld.opt_incpaths, arg) | ('B', arg): bld.opt_instbase = arg | ('t', tag): std.slpush(&tags, tag) @@ -91,29 +83,20 @@ const main = {args : byte[:][:] b = mkbuild(tags) if targname.len != 0 - buildimm(b, targname, cmd.args, bintarg, cleanfirst) + buildimm(b, targname, cmd.args, bintarg) elif runsrc.len != 0 bld.opt_silent = true tmp = std.mktemppath("runmyr") - ok = buildimm(b, tmp, [runsrc][:], true, cleanfirst) + ok = buildimm(b, tmp, [runsrc][:], true) if ok ok = runcmd(tmp, cmd.args) ;; std.remove(tmp) - elif dumponly - findproj(b, "bld.proj") - bld.load(b) - for t in b.all - bld.mbldput("{}\n", t) - ;; else findproj(b, "bld.proj") bld.load(b) /*bld.configure()*/ /* default: buildall */ - if cleanfirst - bld.cleanall(b) - ;; if cmd.args.len == 0 bld.buildall(b) else @@ -136,7 +119,7 @@ const main = {args : byte[:][:] ;; } -const buildimm = {b, targ, inputs, bintarg, cleanfirst -> bool +const buildimm = {b, targ, inputs, bintarg -> bool var mt : bld.myrtarg mt = [ @@ -146,9 +129,6 @@ const buildimm = {b, targ, inputs, bintarg, cleanfirst -> bool .incpath=bld.opt_incpaths, .libdeps=[][:] ] - if cleanfirst - bld.cleanmyr(b, &mt) - ;; if bintarg -> bld.buildbin(b, &mt, true) else
ds lyb BUGFIX conditional header
#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/inotify.h> #include <sys/stat.h> #include <sys/types.h> #include <time.h> #include <unistd.h> +#ifdef SR_HAVE_INOTIFY +# include <sys/inotify.h> +#endif + #include <libyang/libyang.h> #include "compat.h"
[bsp/stm32l496-st-nucleo] update SConscript && remove uart_sample.c
@@ -6,10 +6,6 @@ src = Split(''' main.c ''') -if GetDepend(['BSP_USING_USBD']): - if GetDepend(['RT_USB_DEVICE_CDC']): - src += ['uart_sample.c'] - CPPPATH = [str(Dir('#')), cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
ossl_do_blob_header: fix return check
@@ -1347,8 +1347,8 @@ static OSSL_STORE_INFO *file_try_read_msblob(BIO *bp, int *matchcount) if (BIO_buffer_peek(bp, peekbuf, sizeof(peekbuf)) <= 0) return 0; - if (!ossl_do_blob_header(&p, sizeof(peekbuf), &magic, &bitlen, - &isdss, &ispub)) + if (ossl_do_blob_header(&p, sizeof(peekbuf), &magic, &bitlen, + &isdss, &ispub) <= 0) return 0; }
misc: update badge counts and refs
--- -[![Components](https://img.shields.io/badge/components%20available-88-green.svg) ](https://github.com/openhpc/ohpc/wiki/Component-List-v1.3.6) -[![Additions](https://img.shields.io/badge/new%20additions-7-blue.svg) ](https://github.com/openhpc/ohpc/releases/tag/v1.3.6.GA) -[![Updates](https://img.shields.io/badge/updates-41%25-lightgrey.svg) ](https://github.com/openhpc/ohpc/releases/tag/v1.3.6.GA) -[![Tests](https://img.shields.io/badge/test%20coverage-%20%20%20-brightgreen.svg) ](http://test.openhpc.community:8080/job/1.3.x/view/1.3.6/) +[![Components](https://img.shields.io/badge/components%20available-88-green.svg) ](https://github.com/openhpc/ohpc/wiki/Component-List-v1.3.7) +[![Updates](https://img.shields.io/badge/updates-43%25-lightgrey.svg) ](https://github.com/openhpc/ohpc/releases/tag/v1.3.7.GA) +[![Tests](https://img.shields.io/badge/test%20coverage-%20%20%20-brightgreen.svg) ](http://test.openhpc.community:8080/job/1.3.x/view/1.3.7/) #### Introduction
engine_dispatch: do not release buffers on dyntags
@@ -138,9 +138,10 @@ int flb_engine_dispatch(uint64_t id, struct flb_input_instance *in, /* There is a match, get the buffer */ buf = flb_input_dyntag_flush(dt, &size); if (size == 0) { - if (buf) { - flb_free(buf); - } + /* + * Do not release the buffer since if allocated, it will be + * released upon input_dyntag context destroy. + */ continue; } if (!buf) { @@ -150,24 +151,14 @@ int flb_engine_dispatch(uint64_t id, struct flb_input_instance *in, flb_trace("[dyntag %s] %p tag=%s", dt->in->name, dt, dt->tag); task = flb_task_create(id, buf, size, dt->in, dt, dt->tag, config); if (!task) { - flb_free(buf); + /* Do not release the buffer, will happen on dyntag destroy */ continue; } } } else { - /* - * Check the source of the buffer, input plugins still can have their - * own msgpack buffers. - */ - if (p->cb_flush_buf) { - buf = p->cb_flush_buf(in, &size); - } - else { - /* Use instance buffers */ + /* Get data from instance buffers */ buf = flb_input_flush(in, &size); - } - if (!buf || size == 0) { if (buf) { flb_free(buf);
include/charge_manager.h: Format with clang-format BRANCH=none TEST=none
@@ -66,8 +66,7 @@ enum charge_supplier { [CHARGE_SUPPLIER_BC12_SDP] = "BC12_SDP", \ [CHARGE_SUPPLIER_PROPRIETARY] = "BC12_PROP", \ [CHARGE_SUPPLIER_TYPEC_UNDER_1_5A] = "USBC_U1_5A", \ - [CHARGE_SUPPLIER_OTHER] = "BC12_OTHER", \ - [CHARGE_SUPPLIER_VBUS] = "VBUS", + [CHARGE_SUPPLIER_OTHER] = "BC12_OTHER", [CHARGE_SUPPLIER_VBUS] = "VBUS", #else #define CHARGE_SUPPLIER_NAME_BC12 #endif @@ -87,11 +86,9 @@ enum charge_supplier { #endif #define CHARGE_SUPPLIER_NAME \ - [CHARGE_SUPPLIER_PD] = "PD", \ - [CHARGE_SUPPLIER_TYPEC] = "USBC", \ + [CHARGE_SUPPLIER_PD] = "PD", [CHARGE_SUPPLIER_TYPEC] = "USBC", \ [CHARGE_SUPPLIER_TYPEC_DTS] = "USBC_DTS", \ - CHARGE_SUPPLIER_NAME_BC12 \ - CHARGE_SUPPLIER_NAME_DEDICATED \ + CHARGE_SUPPLIER_NAME_BC12 CHARGE_SUPPLIER_NAME_DEDICATED \ CHARGE_SUPPLIER_NAME_QI /* @@ -114,8 +111,7 @@ struct charge_port_info { * @param charge Charge port current / voltage. If NULL, current = 0 * voltage = 0 will be used. */ -void charge_manager_update_charge(int supplier, - int port, +void charge_manager_update_charge(int supplier, int port, const struct charge_port_info *charge); /* Partner port dualrole capabilities */ @@ -152,8 +148,8 @@ enum ceil_requestor { CEIL_REQUESTOR_COUNT, }; -#define CHARGE_PORT_COUNT (CONFIG_USB_PD_PORT_MAX_COUNT + \ - CONFIG_DEDICATED_CHARGE_PORT_COUNT) +#define CHARGE_PORT_COUNT \ + (CONFIG_USB_PD_PORT_MAX_COUNT + CONFIG_DEDICATED_CHARGE_PORT_COUNT) #if (CONFIG_DEDICATED_CHARGE_PORT_COUNT > 0) /** @@ -322,8 +318,8 @@ int board_set_active_charge_port(int charge_port); * @param max_ma Maximum charge current limit, >= charge_ma. * @param charge_mv Negotiated charge voltage (mV). */ -void board_set_charge_limit(int port, int supplier, int charge_ma, - int max_ma, int charge_mv); +void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, + int charge_mv); /** * Get whether the port is sourcing power on VBUS. @@ -367,9 +363,8 @@ __override_proto int board_charge_port_is_connected(int port); * @param port Dedicated charge port. * @param r USB PD power info to be updated. */ -__override_proto -void board_fill_source_power_info(int port, - struct ec_response_usb_pd_power_info *r); +__override_proto void +board_fill_source_power_info(int port, struct ec_response_usb_pd_power_info *r); /** * Board specific callback to get vbus voltage.
docs: set max_user_namespaces on compute nodes
@@ -12,7 +12,6 @@ Preview, so it must be manually enabled with kernel arguments. [sms](*\#*) wwsh -y provision set "${compute_regex}" --kargs=namespace.unpriv_enable=1 # Increase per-user limit on the number of user namespaces that may be created -[sms](*\#*) echo "user.max_user_namespaces=15076" >> /etc/sysctl.conf -[sms](*\#*) pdsh -w $compute_prefix[1-4] 'echo "user.max_user_namespaces=15076" >> /etc/sysctl.conf' +[sms](*\#*) echo "user.max_user_namespaces=15076" >> $CHROOT/etc/sysctl.conf' \end{lstlisting} % end_ohpc_run
sysrepo BUGFIX apply NACM on copy runing->candidate Fixes
@@ -3578,7 +3578,7 @@ sr_copy_config(sr_session_ctx_t *session, const char *module_name, sr_datastore_ } } - if ((src_datastore == SR_DS_RUNNING) && (session->ds == SR_DS_CANDIDATE)) { + if ((src_datastore == SR_DS_RUNNING) && (session->ds == SR_DS_CANDIDATE) && !session->nacm_user) { /* add modules into mod_info without data */ if ((err_info = sr_modinfo_consolidate(&mod_info, 0, SR_LOCK_WRITE, SR_MI_DATA_NO | SR_MI_PERM_NO, session->sid, session->orig_name, session->orig_data, 0, 0, 0))) { @@ -3604,7 +3604,8 @@ sr_copy_config(sr_session_ctx_t *session, const char *module_name, sr_datastore_ goto cleanup; } - if ((src_datastore == SR_DS_CANDIDATE) && (session->ds == SR_DS_RUNNING)) { + if (((src_datastore == SR_DS_CANDIDATE) && (session->ds == SR_DS_RUNNING)) || + ((src_datastore == SR_DS_RUNNING) && (session->ds == SR_DS_CANDIDATE))) { /* MODULES WRITE LOCK */ if ((err_info = sr_shmmod_modinfo_wrlock(&mod_info, session->sid, 0))) { goto cleanup;
Disable PHP on travis for Linux.
@@ -25,7 +25,7 @@ install: before_script: - export BUILD_DIR="build" - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then export DEPLOY_DOCS="true"; fi; + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then export DEPLOY_DOCS="true" CMAKE_FLAGS="$CMAKE_FLAGS -DTINYSPLINE_DISABLE_PHP=TRUE"; fi; - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CMAKE_FLAGS="$CMAKE_FLAGS -DTINYSPLINE_DISABLE_PHP=TRUE -DTINYSPLINE_DISABLE_RUBY=TRUE"; fi; script:
Fix off-by-one error in seekNewline
@@ -123,21 +123,27 @@ static char *readBytes(redisReader *r, unsigned int bytes) { /* Find pointer to \r\n. */ static char *seekNewline(char *s, size_t len) { - char *_s = s, *ret; - int _len = len-1; + char *ret; - /* Exclude the last character from the searched length because the found - * '\r' should be followed by a '\n' */ - while ((ret = memchr(_s, '\r', _len)) != NULL) { + /* We cannot match with fewer than 2 bytes */ + if (len < 2) + return NULL; + + /* Search up to len - 1 characters */ + len--; + + /* Look for the \r */ + while ((ret = memchr(s, '\r', len)) != NULL) { if (ret[1] == '\n') { /* Found. */ break; } /* Continue searching. */ ret++; - _len -= ret - _s; - _s = ret; + len -= ret - s; + s = ret; } + return ret; }
JSONLib: tune convert to string code
@@ -308,16 +308,10 @@ String CJSONEntry::getStringObject( const char* name, const char* szDefValue ) struct json_object* obj = json_object_object_get(m_object,const_cast<char*>(name)); if ( obj != 0 ) { - if (json_object_is_type(obj,json_type_string)) { - int len = json_object_get_string_len(obj); - const char* str = json_object_get_string(obj); + size_t len = 0; + const char* str = json_object_to_json_string_length(obj, JSON_C_TO_STRING_SPACED, &len); return String(str, len); } - else { - const char* str = json_object_get_string(obj); - return String(str); - } - } else if (szDefValue != 0 ) { return String(szDefValue); @@ -329,16 +323,10 @@ String CJSONEntry::getStringObject( const char* name, const char* szDefValue ) String CJSONEntry::getStringObject() { - if (isString()) { - int len = json_object_get_string_len(m_object); - const char* str = json_object_get_string(m_object); + size_t len = 0; + const char* str = json_object_to_json_string_length(m_object, JSON_C_TO_STRING_SPACED, &len); return String(str, len); } - else { - const char* str = json_object_get_string(m_object); - return String(str); - } -} const char* CJSONEntry::getString(const char* name)
Adjust the default MAXEVENTS value.
#include "evt.h" -#define MAXEVENTS 100 +#define MAXEVENTS 10 struct _evt_t { @@ -511,7 +511,7 @@ evtMetric(evt_t *evt, const char *host, uint64_t uid, event_t *metric) if (time(&now) > rateTime) { rateTime = now; rate = notified = 0; - } else if (++rate > MAXEVENTS) { + } else if (++rate >= MAXEVENTS) { // one notice per truncate if (notified == 0) { char *notice;
updates $%lient/%rver +task interfaces to use $>
== :: ++ task + $~ [%vega ~] $% :: event failure notification :: - [%crud p=@tas q=(list tank)] + $>(%crud vane-task) :: system started up; reset open connections :: - [%born ~] + $>(%born vane-task) :: report upgrade :: - [%vega ~] + $>(%vega vane-task) :: fetches a remote resource :: [%request =request:http =outbound-config] [%receive id=@ud =http-event:http] :: memory usage request :: - [%wegh ~] + $>(%wegh vane-task) == -- :: +client-response: one or more client responses given to the caller == :: ++ task + $~ [%vega ~] $% :: event failure notification :: - [%crud p=@tas q=(list tank)] + $>(%crud vane-task) :: initializes ourselves with an identity :: - :: TODO: Remove this once we single home. - :: - [%init our=@p] + $>(%init vane-task) :: new unix process :: + :: XX use +vane-task + :: [%born p=(list host)] :: report upgrade :: - [%vega ~] + $>(%vega vane-task) :: notifies us of the ports of our live http servers :: [%live insecure=@ud secure=(unit @ud)] [%disconnect =binding] :: memory usage request :: - [%wegh ~] + $>(%wegh vane-task) == :: --
in_node_exporter_metrics: handle missing fields in different kernel versions
#include <unistd.h> +/* + * See kernel documentation for a description: + * https://www.kernel.org/doc/html/latest/filesystems/proc.html + * + * user: normal processes executing in user mode + * nice: niced processes executing in user mode + * system: processes executing in kernel mode + * idle: twiddling thumbs + * iowait: In a word, iowait stands for waiting for I/O to complete. But there are several problems: + * irq: servicing interrupts + * softirq: servicing softirqs + * steal: involuntary wait + * guest: running a normal guest + * guest_nice: running a niced guest + * + * Ensure to pick the correct version of the documentation, older versions here: + * https://github.com/torvalds/linux/tree/master/Documentation + */ struct cpu_stat_info { double user; double nice; @@ -109,7 +127,7 @@ static int cpu_thermal_update(struct flb_ne *ctx, uint64_t ts) continue; } - /* Phisical ID */ + /* Physical ID */ ret = ne_utils_file_read_uint64(ctx->path_sysfs, entry->str, "topology", "physical_package_id", @@ -223,9 +241,15 @@ static int stat_line(char *line, struct cpu_stat_info *st) &st->steal, &st->guest, &st->guest_nice); - if (ret != 10) { + + /* On some older kernels the 'guest_nice' value may be missing */ + if (ret < 9) { return -1; } + /* Ensure we zero initialise it */ + if ( ret == 9 ) { + st->guest_nice = 0; + } /* Convert to seconds based on USER_HZ kernel param */ st->user /= user_hz;
Update i2c documentation Description for i2c_slave_read_buffer had leftover from copying from write fct. data pointer description described the wrong way (writing into internal buffer) Closes
@@ -384,7 +384,7 @@ int i2c_slave_write_buffer(i2c_port_t i2c_num, uint8_t* data, int size, TickType * Only call this function in I2C slave mode * * @param i2c_num I2C port number - * @param data data pointer to write into internal buffer + * @param data data pointer to accept data from internal buffer * @param max_size Maximum data size to read * @param ticks_to_wait Maximum waiting ticks *
Suppress errors about undocumented asn1_d2i_read_bio asn1_d2i_read_bio is exported by libcrypto but is only intended for internal usage, and does not exist in our public headers. Therefore we suppress errors about it being a newly added undocumented symbol.
ossl_cmp_allow_unprotected_cb_t datatype # DEFINE_SPARSE_ARRAY_OF define +#Functions exported by libcrypto that don't exist in our public headers +asn1_d2i_read_bio internal
updated to reflect SGDK changes
@@ -53,12 +53,11 @@ void JOY_reset() gport = 0xFFFF; - /* disable ints */ + /* disable ints (we can do it here for safety) */ SYS_disableInts(); #if (HALT_Z80_ON_IO == 1) - z80state = Z80_isBusTaken(); - if (!z80state) Z80_requestBus(FALSE); + z80state = Z80_getAndRequestBus(TRUE); #endif /* check for EA 4-Way Play */ @@ -131,8 +130,7 @@ void JOY_reset() VDP_waitVSync(); #if (HALT_Z80_ON_IO == 1) - z80state = Z80_isBusTaken(); - if (!z80state) Z80_requestBus(FALSE); + z80state = Z80_getAndRequestBus(TRUE); #endif /* get ID port 1 */ @@ -273,8 +271,7 @@ static void externalIntCB() if (extSet || (gport == 0xFFFF)) return; #if (HALT_Z80_ON_IO == 1) - z80state = Z80_isBusTaken(); - if (!z80state) Z80_requestBus(FALSE); + z80state = Z80_getAndRequestBus(TRUE); #endif pb = (vu8 *)0xa10003 + gport*2; @@ -310,8 +307,7 @@ void JOY_setSupport(u16 port, u16 support) if (port > PORT_2) return; #if (HALT_Z80_ON_IO == 1) - z80state = Z80_isBusTaken(); - if (!z80state) Z80_requestBus(FALSE); + z80state = Z80_getAndRequestBus(TRUE); #endif if ((portType[port] == PORT_TYPE_MENACER) || (portType[port] == PORT_TYPE_JUSTIFIER)) @@ -563,11 +559,7 @@ u16 JOY_waitPressTime(u16 joy, u16 btn, u16 time) { u16 state; - VDP_waitVSync(); - - /* vblank int won't occur - do JOY_update() manually */ - if (SYS_getInterruptMaskLevel() >= 6) - JOY_update(); + SYS_doVBlankProcess(); if (joy == JOY_ALL) { @@ -1142,8 +1134,7 @@ void JOY_update() SYS_disableInts(); #if (HALT_Z80_ON_IO == 1) - z80state = Z80_isBusTaken(); - if (!z80state) Z80_requestBus(FALSE); + z80state = Z80_getAndRequestBus(TRUE); #endif switch (portSupport[PORT_1])
docs/glossary: Add definitions for "buffer" and "fragmentation".
@@ -16,6 +16,11 @@ Glossary may also refer to "boardless" ports like :term:`Unix port <MicroPython Unix port>`). + buffer + An object implementing a buffer protocol. The simplest examples of + buffers are `bytes` (read-only buffer) and `bytearray` (read-write + buffer). + callee-owned tuple A tuple returned by some builtin function/method, containing data which is valid for a limited time, usually until next call to the @@ -59,6 +64,27 @@ Glossary differently than CPython, while still aspiring to be a Python language implementation. + fragmentation + Fragmentation is a phenomenon of any dynamic memory allocation + system when free memory is spread across a number of chunks, + so while total amount of free memory may be high, allocating + a contiguous chunk of memory is possible only within the size + of the largest free chunk. Note that fragmentation is not just + an issue of scripting languages or MicroPython in particular, + a C program performing dynamic allocation is subject to the + same issues. To understand a problem better, consider following + example: there're 4K of memory total, and application consecutively + allocates 1K chunks, numbered #0, #1, #2, #3. Then if application + frees chunks #1 and #3, there're total 2K of free memory. However, + it's possible to allocate a chunk with the maximum size of 1K only. + Measures to fight fragmentation include: 1) preallocation (static + allocation) and inplace operations; 2) compacting garbage + collection. Static allocation is a well-known technique oftentimes + used in C. Unlike many other scripting languages, Python provides + excelent capabilities for inplace operations on preallocated + buffers and objects, and MicroPython extends it even further. + Compacting garbage collection is however an open topic. + GPIO General-purpose input/output. The simplest means to control electrical signals. With GPIO, user can configure hardware
Improve comments in parse_mbed_words()
@@ -287,14 +287,15 @@ class NameCheck(): def parse_mbed_words(self, files): """ - Parse all words in the file that begin with MBED. Includes macros. - There have been typos of TLS, hence the broader check than MBEDTLS. + Parse all words in the file that begin with MBED, in and out of macros, + comments, anything. Args: * files: a List of filepaths to look through. Returns a List of Match objects for words beginning with MBED. """ + # Typos of TLS are common, hence the broader check below than MBEDTLS. mbed_regex = re.compile(r"\bMBED.+?_[A-Z0-9_]*") exclusions = re.compile(r"// *no-check-names|#error")
fix: enable vagrant box version check and disable update engine in Flatcar This is to prevent any reboot during e2e execution which could lead to connection loss.
Vagrant.configure("2") do |config| config.vm.box = "flatcar-stable" + config.vm.box_check_update = true config.vm.box_url = "https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_vagrant.json" memory = 8192 cpus = 4 @@ -34,6 +35,9 @@ Vagrant.configure("2") do |config| sh.inline = <<~SHELL set -euxo pipefail + # Disable update-engine to avoid system reboots + systemctl disable --now update-engine.service + # Disable docker systemctl disable --now docker.service
Clarify comment rules.
@@ -85,7 +85,7 @@ TABLE OF CONTENTS: 2.2. As-If Rule: - Anything specified in this document may be treated however the + Any behavior specified in this document may be treated however the compiler wishes, as long as the result is observed as if the semantics specified were followed strictly. @@ -93,18 +93,19 @@ TABLE OF CONTENTS: 3.1. Whitespace and Keywords: - The language is composed of several classes of tokens. There are - comments, identifiers, keywords, punctuation, and whitespace. + The language is composed of several classes of tokens: comments, + identifiers, keywords, punctuation, and whitespace. Comments begin with "/*" and end with "*/". This style of comment may nest, meaning that /* and */ still have a meaning within the - comment. No other text in this comment is interpreted. + comment. No other text in this type of comment is interpreted. /* this is a comment /* with another inside */ */ Alternatively, '//' may be used to denote a comment. This comment will extend to the end of the current line. Newlines within a line - comment may not be escaped. + comment may not be escaped. /* has no special meaning within a // + comment. // this is a line comment // it will end on this line, regardless of the trailing \
Fixed CMSIS generic library documentation and example.
@@ -259,16 +259,16 @@ Refer to \ref core_config_sect for a list of the available <b>core_<cpu>.h</b> h \b Example: The following code section shows the usage of the <b>core_&lt;cpu&gt;.h</b> header files to build a generic library for Cortex-M0, Cortex-M3, Cortex-M4, or Cortex-M7. To -select the processor, the source code uses the define \b CORTEX_M7, \b CORTEX_M4, \b CORTEX_M3, \b CORTEX_M0, or \b CORTEX_M0PLUS. By using this header file, the source code can access -the functions for \ref Core_Register_gr, \ref intrinsic_CPU_gr, \ref intrinsic_SIMD_gr, and \ref ITM_Debug_gr. - +select the processor, the source code uses the define \b CORTEX_M7, \b CORTEX_M4, \b CORTEX_M3, \b CORTEX_M0, or \b CORTEX_M0PLUS. One of these defines needs to be provided +on the compiler command line. By using this header file, the source code can access the functions for \ref Core_Register_gr, \ref intrinsic_CPU_gr, \ref intrinsic_SIMD_gr, +and \ref ITM_Debug_gr. \code #define __CMSIS_GENERIC /* disable NVIC and Systick functions */ #if defined (CORTEX_M7) #include "core_cm7.h" -#if defined (CORTEX_M4) +#elif defined (CORTEX_M4) #include "core_cm4.h" #elif defined (CORTEX_M3) #include "core_cm3.h"
add Linux kernel coding style as the fall back for subjects that are not covered in our guideline
@@ -105,6 +105,10 @@ For example, a file called `test.h` should have: #endif // TEST_H ``` +Don't use `pragam once` which is not supported by all C/C++ compilers + +## MISC +For subjects that are not coverred here, we follow [Linux kernel coding style](https://www.kernel.org/doc/html/v4.10/process/coding-style.html#linux-kernel-coding-style) ## Commit and Merge To avoid creating redundant merge commits the following methods are recommanded:
docs: Added a step to avoid compilation failures issue
@@ -79,8 +79,11 @@ In curly braces below `if(CONFIG_APPIMG_LOAD_FLASH)`,find `add_appimg(${target} PLATFORM_TARGET ?= Fibocom-L610 + #### b. Disable the Fabric Macro Switch - #### b. Open a Linux shell, enter `<L610 Root>/BoAT-X-Framework` directory and compile BoAT static library + The platform does not support the FABRIC chain for the time being due to resource constraints. So, open the main makefile, find `BOAT_PROTOCOL_USE_HLFABRIC` and change the parameter to 0, which is` BOAT_PROTOCOL_USE_HLFABRIC? = 0`. + + #### c. Open a Linux shell, enter `<L610 Root>/BoAT-X-Framework` directory and compile BoAT static library cd <L610 Root>/BoAT-X-Framework make clean
Deprecated option --geoip-city-data in favor of --geoip-database. Closes
@@ -144,9 +144,6 @@ struct option long_opts[] = { #ifdef HAVE_GEOLOCATION {"geoip-database" , required_argument , 0 , 0 } , #endif -#ifdef HAVE_LIBGEOIP - {"geoip-city-data" , required_argument , 0 , 0 } , -#endif #ifdef TCB_BTREE {"accumulated-time" , no_argument , 0 , 0 } , {"cache-lcnum" , required_argument , 0 , 0 } , @@ -618,7 +615,7 @@ parse_long_opt (const char *name, const char *oarg) /* GEOIP OPTIONS * ========================= */ /* specifies the path of the GeoIP City database file */ - if (!strcmp ("geoip-city-data", name) || !strcmp ("geoip-database", name)) + if (!strcmp ("geoip-database", name)) conf.geoip_database = oarg; /* BTREE OPTIONS
[core] fix triggered assert on HTTP chunked input (fixes (thx AlxT) x-ref: "Segmentation fault on HTTP chunked input"
@@ -125,6 +125,7 @@ static handler_t connection_handle_read_post_chunked(server *srv, connection *co while (0 == te_chunked) { char *p; chunk *c = cq->first; + if (NULL == c) break; force_assert(c->type == MEM_CHUNK); p = strchr(c->mem->ptr+c->offset, '\n'); if (NULL != p) { /* found HTTP chunked header line */
Device fix for BLE: call uBleInit/uBleDeinit(). When the device layer was introduced in commit the calls to the BLE init/deinit functions, which used to be in uNetworkInitBle()/UNetworkDeinitBle(), were lost. Oops. They are now added in uDevicePrivateShortRangeInit()/uDevicePrivateShortRangeDeinit().
#include "u_short_range_edm_stream.h" #include "u_ble_module_type.h" +#include "u_ble.h" #include "u_device_shared_short_range.h" #include "u_device_private_short_range.h" @@ -71,6 +72,9 @@ int32_t uDevicePrivateShortRangeInit() if (errorCode == 0) { errorCode = uAtClientInit(); } + if (errorCode == 0) { + errorCode = uBleInit(); + } if (errorCode == 0) { errorCode = uShortRangeInit(); } @@ -81,6 +85,7 @@ int32_t uDevicePrivateShortRangeInit() void uDevicePrivateShortRangeDeinit() { uShortRangeDeinit(); + uBleDeinit(); uShortRangeEdmStreamDeinit(); uAtClientDeinit(); }
peview: Add hack for SymSearchW crashes
@@ -1889,12 +1889,14 @@ BOOL CALLBACK EnumCallbackProc( symDataKind = SymbolInfo_DataKindStr(dataKindType); - //if (dataKindType == DataIsLocal || - // dataKindType == DataIsParam || - // dataKindType == DataIsObjectPtr) - //{ - // break; - //} + if ( + dataKindType == DataIsLocal || + dataKindType == DataIsParam || + dataKindType == DataIsObjectPtr + ) + { + break; + } symbol = PhAllocate(sizeof(PV_SYMBOL_NODE)); memset(symbol, 0, sizeof(PV_SYMBOL_NODE)); @@ -2404,6 +2406,11 @@ NTSTATUS PeDumpFileSymbols( SymEnumTypesW_I(NtCurrentProcess(), Context->BaseAddress, EnumCallbackProc, Context); //PrintUserDefinedTypes(Context); // Commented out due to verbosity. + if ( + PhFindStringInString(PvFileName, 0, L"ntkrnlmp.pdb") != -1 || + PhFindStringInString(PvFileName, 0, L"ntoskrnl.exe") != -1 // HACK: SymSearchW crashes for ole32.dll + ) + { // NOTE: The SymEnumSymbolsW and SymEnumTypesW functions don't enumerate exported DATA symbols such as // as PsActiveProcessHead and PsLoadedModuleList from ntoskrnl.exe?? // TODO: SymSearchW does enumerate those symbols but we'll need to filter out duplicate symbol entries properly or @@ -2420,6 +2427,7 @@ NTSTATUS PeDumpFileSymbols( SYMSEARCH_RECURSE | SYMSEARCH_ALLITEMS ); } + } CleanupExit:
Remove out of date documentation bit `clap-plugin-core` was removed in
@@ -5,8 +5,7 @@ project(CLAP LANGUAGES C CXX VERSION 1.1.2) option(CLAP_BUILD_TESTS "Should CLAP build tests and the like?" OFF) # If you use clap as a submodule of your plugin you need some interface projects -# to allow you to link. clap-core gives you the include directory and clap-plugin-core -# gives you the core + plugin-glue. +# to allow you to link add_library(clap INTERFACE) target_include_directories(clap INTERFACE include)
Remove reduntant dirty check When flush completion is called there could be some clines marked as dirty since those could be in-use during flushing.
@@ -598,20 +598,6 @@ static void _ocf_mngt_flush_finish(ocf_pipeline_t pipeline, void *priv, ocf_cache_t cache = context->cache; ocf_core_t core = context->core; - if (!error) { - switch(context->op) { - case flush_cache: - case purge_cache: - ENV_BUG_ON(ocf_mngt_cache_is_dirty(cache)); - break; - case flush_core: - case purge_core: - ENV_BUG_ON(env_atomic_read( - &core->runtime_meta->dirty_clines)); - break; - } - } - _ocf_mngt_end_flush(cache); switch (context->op) {
error: corrected error message & categorization for kdb.c
@@ -957,7 +957,7 @@ int kdbGet (KDB * handle, KeySet * ks, Key * parentKey) if (ns == KEY_NS_EMPTY) { - ELEKTRA_ADD_VALIDATION_SYNTACTIC_WARNING (parentKey, "Empty namespace passed to kdbGet"); + ELEKTRA_ADD_INTERFACE_WARNING (parentKey, "Empty namespace passed to kdbGet. Please use the cascading key / instead"); } int errnosave = errno;