message
stringlengths
6
474
diff
stringlengths
8
5.22k
fs/partiton: add sanity check mmcsd_spi don't support ioctl when blocksize is zero, will cause crash.
@@ -155,10 +155,12 @@ int parse_block_partition(FAR const char *path, state.mtd = NULL; - ret = state.blk->u.i_bops->ioctl( - state.blk, MTDIOC_GEOMETRY, (unsigned long)(uintptr_t)&mgeo); - if (ret >= 0) + if (state.blk->u.i_bops->ioctl != NULL && + state.blk->u.i_bops->ioctl(state.blk, MTDIOC_GEOMETRY, + (unsigned long)(uintptr_t)&mgeo) >= 0) { + DEBUGASSERT(mgeo.blocksize); + state.blocksize = mgeo.blocksize; state.erasesize = mgeo.erasesize; state.nblocks = mgeo.neraseblocks; @@ -171,6 +173,8 @@ int parse_block_partition(FAR const char *path, ret = state.blk->u.i_bops->geometry(state.blk, &geo); if (ret >= 0) { + DEBUGASSERT(geo.geo_sectorsize); + state.blocksize = geo.geo_sectorsize; state.erasesize = geo.geo_sectorsize; state.nblocks = geo.geo_nsectors; @@ -213,6 +217,8 @@ int parse_mtd_partition(FAR struct mtd_dev_s *mtd, return ret; } + DEBUGASSERT(mgeo.blocksize); + state.blk = NULL; state.mtd = mtd; state.blocksize = mgeo.blocksize;
dm-hook: mutate screened before giving fact Fixes an issue where the subscription update would contain stale data
?> =(1 ~(wyt by nodes)) =/ ship-screen (~(get ju screened) src.bowl) =. ship-screen (~(uni in ship-screen) (normalize-incoming nodes)) - :_ state(screened (~(put by screened) src.bowl ship-screen)) + =. screened (~(put by screened) src.bowl ship-screen) + :_ state =/ =action:hook [%pendings ~(key by screened)] :- (fact:io dm-hook-action+!>(action) ~[/updates])
Replace transformation of warnings to errors in elektra.c with elektra_error.c
#include "kdbhelper.h" #include "kdblogger.h" #include "kdbprivate.h" -#include <stdio.h> #include <stdlib.h> #ifdef __cplusplus @@ -119,36 +118,20 @@ Elektra * elektraOpen (const char * application, KeySet * defaults, KeySet * con const int kdbGetResult = kdbGet (kdb, config, parentKey); - // Look for warnings in the parentKey after kdbGet(). - // If there are warnings, create an error, set the param "error" and return NULL. - KeySet * parentKeyMeta = keyMeta(parentKey); - for (elektraCursor metaIt = 0; metaIt < ksGetSize (parentKeyMeta); metaIt++) { - // All warnings are available as array items of array "warnings" in parentKey. - const Key * currentMetaKey = ksAtCursor(parentKeyMeta, metaIt); - // If the meta key name starts with "warnings", it is a warning. - bool isWarning = strncmp(keyName(currentMetaKey), "meta:/warnings", strlen("meta:/warnings")) == 0; - - size_t baseNameSize = keyGetBaseNameSize (currentMetaKey); - char * kBaseName = elektraMalloc (baseNameSize * sizeof (char)); - keyGetBaseName (currentMetaKey, kBaseName, baseNameSize); - // If the baseName is "reason", this is the reason we are interested in - // (e.g. "Value '50' of key 'proc:/sw/jonls/redshift/#0/current/temp/day' not within range 1000-2500") - bool isWarningReason = isWarning && strcmp(kBaseName, "reason") == 0; - if (isWarningReason) { - // We found a warning reason. - const char * warningReason = keyString(currentMetaKey); - // Create an error that we can return to the calling application via the "error" param. - ELEKTRA_SET_INTERNAL_ERROR (parentKey, warningReason); - *error = elektraErrorFromKey (parentKey); - elektraFree (kBaseName); + // Applications using the HL API should treat warnings as errors. Therefore, if a warning occurred, set the error param and return NULL. + ElektraError * myError = elektraErrorFromKey (parentKey); + + if (myError->warningCount > 0) { + // If there are warnings, pick the first warning, set it to param "error" and return NULL. + // We can only report 1 error at a time. Once the user has fixed that error, they will be informed about the next one on the next execution of the application. + + *error = myError->warnings[0]; ksDel(config); kdbClose(kdb, parentKey); keyDel(parentKey); return NULL; } - elektraFree (kBaseName); - } if (kdbGetResult == -1) { @@ -170,7 +153,7 @@ Elektra * elektraOpen (const char * application, KeySet * defaults, KeySet * con } else { - *error = elektraErrorFromKey (parentKey); + *error = myError; ksDel (config); kdbClose (kdb, parentKey);
opae.io: fix subsystem device ID for d5005 It was errneously set to 0x138f. It should be 0x138d.
@@ -427,7 +427,7 @@ fpga_devices = { pci.make_id(0x8086, 0xbcce, 0x8086, 0x17d4): "Intel C6100 ADP", pci.make_id(0x8086, 0xbccf, 0x8086, 0x17d4): "Intel C6100 ADP VF", pci.make_id(0x8086, 0xbcce, 0x8086, 0x138d): "Intel D5005 ADP", - pci.make_id(0x8086, 0xbccf, 0x8086, 0x138e): "Intel D5005 ADP VF", + pci.make_id(0x8086, 0xbccf, 0x8086, 0x138d): "Intel D5005 ADP VF", pci.make_id(0x1c2c, 0x1000): "Silicom SmartNIC N5010", pci.make_id(0x1c2c, 0x1001): "Silicom SmartNIC N5011", }
Fix mesh attributes;
#include "graphics/mesh.h" #include "graphics/graphics.h" #include <stdlib.h> +#include <stdio.h> static void lovrMeshBindAttributes(Mesh* mesh) { Shader* shader = lovrGraphicsGetShader(); @@ -17,7 +18,8 @@ static void lovrMeshBindAttributes(Mesh* mesh) { vec_foreach(&mesh->format, attribute, i) { int location = lovrShaderGetAttributeId(shader, attribute.name); - if (location >= 0 && (mesh->enabledAttributes & (1 << i))) { + if (location >= 0) { + if (mesh->enabledAttributes & (1 << i)) { glEnableVertexAttribArray(location); if (attribute.type == MESH_INT) { @@ -32,6 +34,7 @@ static void lovrMeshBindAttributes(Mesh* mesh) { } else { glDisableVertexAttribArray(location); } + } offset += sizeof(attribute.type) * attribute.count; }
Fix dirtied sittingToStanding matrix;
@@ -21,8 +21,9 @@ static void onRequestAnimationFrame(void* userdata) { float projection[16]; float transform[16]; + float sittingToStanding[16]; - mat4 sittingToStanding = emscripten_vr_get_sitting_to_standing_matrix(); + mat4_set(sittingToStanding, emscripten_vr_get_sitting_to_standing_matrix()); mat4_invert(sittingToStanding); for (HeadsetEye eye = EYE_LEFT; eye <= EYE_RIGHT; eye++) {
[core] fix bug in FastCGI uploads (thx zoon01 and ms49434) x-ref: "Memory Growth with PUT and full buffered streams"
@@ -2110,11 +2110,12 @@ handler_t gw_handle_subrequest(request_st * const r, void *p_d) { if ((0 != hctx->wb.bytes_in || -1 == hctx->wb_reqlen) && !chunkqueue_is_empty(&r->reqbody_queue)) { - if (hctx->stdin_append - && chunkqueue_length(&hctx->wb) < 65536 - 16384) { + if (hctx->stdin_append) { + if (chunkqueue_length(&hctx->wb) < 65536 - 16384) { handler_t rca = hctx->stdin_append(hctx); if (HANDLER_GO_ON != rca) return rca; } + } else chunkqueue_append_chunkqueue(&hctx->wb, &r->reqbody_queue); if (fdevent_fdnode_interest(hctx->fdn) & FDEVENT_OUT) {
doc: add v1.0 doc menu to master Update the /latest documents with a menu choice for the 1.0 release docs.
@@ -189,6 +189,7 @@ else: html_context = { 'current_version': current_version, 'versions': ( ("latest", "/latest/"), + ("1.0", "/1.0/"), ("0.8", "/0.8/"), ("0.7", "/0.7/"), ("0.6", "/0.6/"),
ci: update cmake for travis
@@ -5,7 +5,13 @@ compiler: os: - linux - osx - +addons: + apt: + sources: + - george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3 + packages: + - cmake + - cmake-data env: - FLB_MEM="-DFLB_JEMALLOC=On" - FLB_MEM="-DFLB_JEMALLOC=Off"
gk110: Add missing flags for addop3b LIMM form Results from nvdisasm: 41000000: IADD32I.X R0, R0, 0x0 40800000: IADD32I R0.CC, R0, 0x0
@@ -895,6 +895,7 @@ F1(acout32, 0x32, CC) F1(acout37, 0x37, CC) F1(acin2e, 0x2e, CC) F1(acin34, 0x34, CC) +F1(acin38, 0x38, CC) F1(acin3c, 0x3c, CC) F1(shiftamt, 0x2c, N("shiftamt")) @@ -1585,7 +1586,7 @@ static struct insn tabm[] = { }; static struct insn tabi[] = { - { 0x4000000000000001ull, 0xf580000000000003ull, T(addop3b), T(sat39), N("b32"), DST, SRC1, LIMM }, + { 0x4000000000000001ull, 0xf400000000000003ull, T(addop3b), T(sat39), N("b32"), DST, T(acout37), SRC1, LIMM , T(acin38) }, { 0x8000000000000001ull, 0xf180000000000003ull, N("set"), T(ftz3a), N("b32"), DST, T(acout32), T(setit), N("f32"), T(neg2e), T(abs39), SRC1, T(neg3b), FIMM, T(setlop3) }, // XXX: find f32 dst { 0x0040000000000001ull, 0x37c0000000000003ull, N("popc"), N("b32"), DST, T(not2a), SRC1, T(i3bi2) }, { 0x0080000000000001ull, 0x37c0000000000003ull, T(addop), T(sat35), N("b32"), DST, T(acout32), SRC1, T(i3bi2) },
include/wireless.h: Format with clang-format BRANCH=none TEST=none
#include "common.h" /* Wireless power state for wireless_set_state() */ -enum wireless_power_state { - WIRELESS_OFF, - WIRELESS_SUSPEND, - WIRELESS_ON -}; +enum wireless_power_state { WIRELESS_OFF, WIRELESS_SUSPEND, WIRELESS_ON }; /** * Set wireless power state. @@ -23,7 +19,9 @@ enum wireless_power_state { #ifdef CONFIG_WIRELESS void wireless_set_state(enum wireless_power_state state); #else -static inline void wireless_set_state(enum wireless_power_state state) { } +static inline void wireless_set_state(enum wireless_power_state state) +{ +} #endif #endif /* __CROS_EC_WIRELESS_H */
Improve Windows build.
@@ -103,7 +103,7 @@ read_random(void *buf, size_t size) position = 0; while (position < size) { if (rand_s(&randval) == 0) { - remaining = MIN(count - i, sizeof(unsigned int)); + remaining = MIN(size - position, sizeof(unsigned int)); memcpy((char *)buf + position, &randval, remaining); position += sizeof(unsigned int) }
chat: fix station string format
@@ -44,7 +44,10 @@ export class ChatScreen extends Component { componentDidUpdate(prevProps, prevState) { const { props, state } = this; - const station = `/${props.match.params.ship}/${props.match.params.station}` + const station = + props.match.params[1] === undefined ? + `/${props.match.params.ship}/${props.match.params.station}` : + `/${props.match.params[1]}/${props.match.params.ship}/${props.match.params.station}`; if ( prevProps.match.params.station !== props.match.params.station ||
Add minor changes to `pyto_ui`
@@ -4039,7 +4039,7 @@ class TextField(Control): """ The text contained in the Text Field. - :rtype: + :rtype: str """ return str(self.__py_view__.text) @@ -4258,8 +4258,7 @@ def __pil_image_from_ui_image__(image): img_str = str(image.data.base64EncodedStringWithOptions(0)) msg = base64.b64decode(img_str) - with io.BytesIO(msg) as buf: - return Image.open(buf) + return Image.open(BytesIO(msg)) def font_family_names() -> List[str]:
merge pull request call `SSL_CTX_set_ecdh_auto` only when available
@@ -194,7 +194,10 @@ static int setup_ssl(const char *cert_file, const char *key_file, const char *ci 86400); h2o_socket_ssl_async_resumption_setup_ctx(accept_ctx.ssl_ctx); } + +#ifdef SSL_CTX_set_ecdh_auto SSL_CTX_set_ecdh_auto(accept_ctx.ssl_ctx, 1); +#endif /* load certificate and private key */ if (SSL_CTX_use_certificate_file(accept_ctx.ssl_ctx, cert_file, SSL_FILETYPE_PEM) != 1) {
Plugin Ordering: Improve formatting of table
@@ -52,16 +52,18 @@ names to be referred to in the contract. Here you see a table that contains all names: - 0 prerollback getresolver setresolver - 1 prerollback pregetstorage presetstorage - 2 prerollback pregetstorage presetstorage - 3 prerollback pregetstorage presetstorage - 4 prerollback pregetstorage presetstorage - 5 rollback getstorage setstorage - 6 postrollback postgetstorage precommit - 7 postrollback postgetstorage commit - 8 postrollback postgetstorage postcommit - 9 postrollback postgetstorage postcommit +| Slot | Error | Get | Set | +| ---- | ------------ | -------------- | ------------- | +| 0 | prerollback | getresolver | setresolver | +| 1 | prerollback | pregetstorage | presetstorage | +| 2 | prerollback | pregetstorage | presetstorage | +| 3 | prerollback | pregetstorage | presetstorage | +| 4 | prerollback | pregetstorage | presetstorage | +| 5 | rollback | getstorage | setstorage | +| 6 | postrollback | postgetstorage | precommit | +| 7 | postrollback | postgetstorage | commit | +| 8 | postrollback | postgetstorage | postcommit | +| 9 | postrollback | postgetstorage | postcommit | . How the placement is influenced using `infos/placement`, `infos/ordering` and `infos/stacking` is described in
Updating aomp_common_vars for 11.5-1 dev.
@@ -19,18 +19,10 @@ ROCM_VERSION=${ROCM_VERSION:-3.5.0} # Set the AOMP VERSION STRING and AOMP_PROJECT_REPO_BRANCH. AOMP_VERSION=${AOMP_VERSION:-"11.5"} -AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"0"} +AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"1"} AOMP_VERSION_STRING=${AOMP_VERSION_STRING:-"$AOMP_VERSION-$AOMP_VERSION_MOD"} export AOMP_VERSION_STRING AOMP_VERSION AOMP_VERSION_MOD ROCM_VERSION -# Hash values for repos on dev branches. To recreate build of 11.5-0, verify these repos are on the correct commit. -# rocm-device-libs dc34b35 -# rocm-compilersupport 3ebf0a -# rocminfo 1a81ee3 -# ROCclr (vdi) 928f8b06 -# hip (hip-on-vdi) ffcbd7e6 -# ROCm-OpenCL-Runtime a66edda - # Set install directory and the link directory. # AOMP will be a symbolic link AOMP_INSTALL_DIR is the versioned dir name AOMP=${AOMP:-$HOME/rocm/aomp} @@ -147,13 +139,13 @@ GITKHRONOS="https://github.com/KhronosGroup" # These aomp development repositories AOMP_REPO_NAME=${AOMP_REPO_NAME:-aomp} -AOMP_REPO_BRANCH=${AOMP_REPO_BRANCH:-rel_11.5-0} +AOMP_REPO_BRANCH=${AOMP_REPO_BRANCH:-amd-stg-openmp} AOMP_PROJECT_REPO_NAME=${AOMP_PROJECT_REPO_NAME:-amd-llvm-project} -AOMP_PROJECT_REPO_BRANCH=${AOMP_PROJECT_REPO_BRANCH:-aomp-11.5-0} +AOMP_PROJECT_REPO_BRANCH=${AOMP_PROJECT_REPO_BRANCH:-amd-stg-openmp} AOMP_EXTRAS_REPO_NAME=${AOMP_EXTRAS_REPO_NAME:-aomp-extras} -AOMP_EXTRAS_REPO_BRANCH=${AOMP_EXTRAS_REPO_BRANCH:-aomp-11.5-0} +AOMP_EXTRAS_REPO_BRANCH=${AOMP_EXTRAS_REPO_BRANCH:-amd-stg-openmp} AOMP_FLANG_REPO_NAME=${AOMP_FLANG_REPO_NAME:-flang} -AOMP_FLANG_REPO_BRANCH=${AOMP_FLANG_REPO_BRANCH:-aomp-11.5-0} +AOMP_FLANG_REPO_BRANCH=${AOMP_FLANG_REPO_BRANCH:-amd-stg-openmp} # These extra repositories are needed but we cannot update them AOMP_ROCT_REPO_NAME=${AOMP_ROCT_REPO_NAME:-roct-thunk-interface}
Enhance description for MBEDTLS_PSA_CRYPTO_CONFIG Provided detailed description for MBEDTLS_PSA_CRYPTO_CONFIG so that it is more clear to the user when the feature should be enabled or disabled. It also mentions where to look for PSA crypto config settings; include/psa/crypto_config.h. Removed some other related comments that were not necessary.
* * Enable support for the experimental PSA crypto driver interface. * - * Requires: MBEDTLS_PSA_CRYPTO_C or MBEDTLS_PSA_CRYPTO_CONFIG + * Requires: MBEDTLS_PSA_CRYPTO_C * * \warning This interface is experimental and may change or be removed * without notice. /** * \def MBEDTLS_PSA_CRYPTO_CONFIG * - * This setting should be used to allow for conditional inclusion of PSA features. + * This setting allows support for cryptographic mechanisms through the PSA + * API to be configured separately from support through the mbedtls API. + * + * Uncomment this to enable use of PSA Crypto configuration settings which + * can be found in include/psa/crypto_config.h * - * Uncomment this to enable use of PSA Crypto configuration settings. + * This feature is still experimental and is not ready for production since + * it is not completed. */ //#define MBEDTLS_PSA_CRYPTO_CONFIG #include MBEDTLS_USER_CONFIG_FILE #endif -/** - * \name SECTION: PSA Crypto settings - * - */ #include "mbedtls/config_psa.h" #include "mbedtls/check_config.h"
modnxtdevices: measure only temperature A temperature sensor measures temperature, not celcius/fahrenheit/kelvin.
@@ -366,38 +366,18 @@ STATIC mp_obj_t nxtdevices_TemperatureSensor_make_new(const mp_obj_type_t *type, return MP_OBJ_FROM_PTR(self); } -static float nxtdevices_TemperatureSensor_read(pbdevice_t *pbdev) { - int32_t celcius_scaled; - pbdevice_get_values(pbdev, PBIO_IODEV_MODE_NXT_TEMPERATURE_SENSOR_CELCIUS, &celcius_scaled); - return (celcius_scaled >> 4)/16.0; -} - -// pybricks.nxtdevices.TemperatureSensor.celcius -STATIC mp_obj_t nxtdevices_TemperatureSensor_celcius(mp_obj_t self_in) { - nxtdevices_TemperatureSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); - return mp_obj_new_float(nxtdevices_TemperatureSensor_read(self->pbdev)); -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(nxtdevices_TemperatureSensor_celcius_obj, nxtdevices_TemperatureSensor_celcius); - -// pybricks.nxtdevices.TemperatureSensor.fahrenheit -STATIC mp_obj_t nxtdevices_TemperatureSensor_fahrenheit(mp_obj_t self_in) { - nxtdevices_TemperatureSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); - return mp_obj_new_float(nxtdevices_TemperatureSensor_read(self->pbdev)*1.8+32); -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(nxtdevices_TemperatureSensor_fahrenheit_obj, nxtdevices_TemperatureSensor_fahrenheit); - -// pybricks.nxtdevices.TemperatureSensor.kelvin -STATIC mp_obj_t nxtdevices_TemperatureSensor_kelvin(mp_obj_t self_in) { +// pybricks.nxtdevices.TemperatureSensor.temperature +STATIC mp_obj_t nxtdevices_TemperatureSensor_temperature(mp_obj_t self_in) { nxtdevices_TemperatureSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); - return mp_obj_new_float(nxtdevices_TemperatureSensor_read(self->pbdev)+273.15); + int32_t temperature_scaled; + pbdevice_get_values(self->pbdev, PBIO_IODEV_MODE_NXT_TEMPERATURE_SENSOR_CELCIUS, &temperature_scaled); + return mp_obj_new_float((temperature_scaled >> 4)/16.0); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(nxtdevices_TemperatureSensor_kelvin_obj, nxtdevices_TemperatureSensor_kelvin); +STATIC MP_DEFINE_CONST_FUN_OBJ_1(nxtdevices_TemperatureSensor_temperature_obj, nxtdevices_TemperatureSensor_temperature); // dir(pybricks.ev3devices.TemperatureSensor) STATIC const mp_rom_map_elem_t nxtdevices_TemperatureSensor_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_celcius), MP_ROM_PTR(&nxtdevices_TemperatureSensor_celcius_obj ) }, - { MP_ROM_QSTR(MP_QSTR_fahrenheit), MP_ROM_PTR(&nxtdevices_TemperatureSensor_fahrenheit_obj ) }, - { MP_ROM_QSTR(MP_QSTR_kelvin), MP_ROM_PTR(&nxtdevices_TemperatureSensor_kelvin_obj ) }, + { MP_ROM_QSTR(MP_QSTR_temperature), MP_ROM_PTR(&nxtdevices_TemperatureSensor_temperature_obj) }, }; STATIC MP_DEFINE_CONST_DICT(nxtdevices_TemperatureSensor_locals_dict, nxtdevices_TemperatureSensor_locals_dict_table);
Shader flags can start with flag_; It will be ignored for matching purposes.
@@ -1557,6 +1557,7 @@ static void lovrShaderInit(Shader* shader) { for (uint32_t i = 0; i < shader->info.flagCount; i++) { ShaderFlag* flag = &shader->info.flags[i]; uint32_t hash = flag->name ? (uint32_t) hash64(flag->name, strlen(flag->name)) : 0; + for (uint32_t j = 0; j < shader->flagCount; j++) { if (hash ? (hash != shader->flagLookup[j]) : (flag->id != shader->flags[j].id)) continue; @@ -1833,8 +1834,11 @@ Shader* lovrShaderCreate(const ShaderInfo* info) { uint32_t index = shader->flagCount++; + // Flag names can start with flag_ which will be ignored for matching purposes if (constant->name) { - shader->flagLookup[index] = (uint32_t) hash64(constant->name, strlen(constant->name)); + size_t length = strlen(constant->name); + size_t offset = length > 5 && !memcmp(constant->name, "flag_", 5) ? 5 : 0; + shader->flagLookup[index] = (uint32_t) hash64(constant->name + offset, length - offset); } else { shader->flagLookup[index] = 0; }
Fixed wrong argument number in lookup's GETFROMSTACK
@@ -480,7 +480,7 @@ int syscalls_lookup(void *ustack) GETFROMSTACK(ustack, char *, name, 0); GETFROMSTACK(ustack, oid_t *, file, 1); - GETFROMSTACK(ustack, oid_t *, dev, 1); + GETFROMSTACK(ustack, oid_t *, dev, 2); return proc_portLookup(name, file, dev); }
[account] Bugfix, miss init account list
@@ -27,7 +27,6 @@ type AccountService struct { func NewAccountService(cfg *cfg.Config) *AccountService { actor := &AccountService{ cfg: cfg, - accounts: []*types.Account{}, } actor.BaseComponent = component.NewBaseComponent(message.AccountsSvc, actor, log.NewLogger("account")) @@ -36,6 +35,15 @@ func NewAccountService(cfg *cfg.Config) *AccountService { func (as *AccountService) BeforeStart() { as.ks = key.NewStore(as.cfg.DataDir) + + as.accounts = []*types.Account{} + addresses, err := as.ks.GetAddresses() + if err != nil { + as.Logger.Error().Err(err).Msg("could not open addresses") + } + for _, v := range addresses { + as.accounts = append(as.accounts, &types.Account{Address: v}) + } } func (as *AccountService) AfterStart() {}
minor edit for bos section
@@ -6,7 +6,7 @@ master} host. Alternatively, if choosing to use a pre-installed server, please verify that it is provisioned with the required \baseOS{} distribution. \\ Prior to beginning the installation process of \OHPC{} components, several additional -considerations are noted here for the local host configuration. First, +considerations are noted here for the SMS host configuration. First, the remaining installation recipe instructions herein assume that your SMS host name is resolvable locally. Depending on the manner in which you installed the BOS, there may be an adequate entry already defined
Match gl PushPopStyle count with vulkan's
@@ -136,7 +136,7 @@ void imgui_render() position_layer(params, window_size, vp[2], vp[3]); render_imgui(sw_stats, params, window_size, vp[2], vp[3]); - ImGui::PopStyleVar(2); + ImGui::PopStyleVar(3); ImGui::Render(); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
chat-editor: actually use controlled component
@@ -5,7 +5,7 @@ import 'codemirror/addon/hint/show-hint'; import 'codemirror/lib/codemirror.css'; import 'codemirror/mode/markdown/markdown'; import React, { useRef, ClipboardEvent, useEffect, useImperativeHandle } from 'react'; -import { UnControlled as CodeEditor } from 'react-codemirror2'; +import { Controlled as CodeEditor } from 'react-codemirror2'; import styled from 'styled-components'; import { MOBILE_BROWSER_REGEX } from '~/logic/lib/util'; import '../css/custom.css'; @@ -254,7 +254,7 @@ const ChatEditor = React.forwardRef<CodeMirrorShim, ChatEditorProps>(({ inCodeMo className="lh-copy" value={message} options={options} - onChange={(e, d, v) => messageChange(e, d, v)} + onBeforeChange={(e, d, v) => messageChange(e, d, v)} editorDidMount={(codeEditor) => { editorRef.current = codeEditor; }}
Don't add default autoconf flags to build By default, it adds something like `-O2 -g` to the cflags. That conflicts with the flags in Makefile.am, which specifies -O3. This commit removes the default flags so we only get what we actually specify.
@@ -10,6 +10,9 @@ AC_PREREQ([2.69]) AC_INIT([cglm], [0.6.1], [[email protected]]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects serial-tests]) +# Don't use the default cflags (-O2 -g), we set ours manually in Makefile.am. +: ${CFLAGS=""} + AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/]) AC_CONFIG_HEADERS([config.h])
Improved build instructions, add extra install phase with environment variable for home in order to work with rustup properly.
@@ -615,9 +615,12 @@ In order to end this section, here's a list of ideas that are not completely imp Follow these steps to build and install **METACALL** manually. ``` sh -git clone --recursive https://github.com/metacall/core.git +git clone https://github.com/metacall/core.git mkdir core/build && cd core/build cmake .. +# Unix (Linux and MacOs) +sudo HOME="$HOME" cmake --build . --target install +# Windows (or when installing to a path with permissions) cmake --build . --target install ```
Libtarget.mk: deliver external folder path at buiding external EXTDIR definition is used in external folder so that we should deliver it when external is building.
@@ -170,7 +170,7 @@ $(LIBRARIES_DIR)$(DELIM)libframework$(LIBEXT): $(FRAMEWORK_LIB_DIR)$(DELIM)libfr $(Q) install $(FRAMEWORK_LIB_DIR)$(DELIM)libframework$(LIBEXT) $(LIBRARIES_DIR)$(DELIM)libframework$(LIBEXT) $(EXTDIR)$(DELIM)libexternal$(LIBEXT): context - $(Q) $(MAKE) -C $(EXTDIR) TOPDIR="$(TOPDIR)" libexternal$(LIBEXT) KERNEL=n + $(Q) $(MAKE) -C $(EXTDIR) TOPDIR="$(TOPDIR)" EXTDIR="$(EXTDIR)" libexternal$(LIBEXT) KERNEL=n $(LIBRARIES_DIR)$(DELIM)libexternal$(LIBEXT): $(EXTDIR)$(DELIM)libexternal$(LIBEXT) $(Q) install $(EXTDIR)$(DELIM)libexternal$(LIBEXT) $(LIBRARIES_DIR)$(DELIM)libexternal$(LIBEXT)
node: prettify node type names
@@ -18,13 +18,13 @@ void node_init(struct sway_node *node, enum sway_node_type type, void *thing) { const char *node_type_to_str(enum sway_node_type type) { switch (type) { case N_ROOT: - return "N_ROOT"; + return "root"; case N_OUTPUT: - return "N_OUTPUT"; + return "output"; case N_WORKSPACE: - return "N_WORKSPACE"; + return "workspace"; case N_CONTAINER: - return "N_CONTAINER"; + return "container"; } return ""; }
machinarium: avoid errno setting to reduce __errno_location() calls
@@ -32,9 +32,6 @@ static inline void mm_errno_set(int value) { mm_scheduler_current(&mm_self->scheduler)->errno_ = value; - - /* update system errno as well */ - errno = value; } static inline int
GraphContentWide: type guard with conditionals
@@ -24,8 +24,7 @@ function GraphContentWideInner( return ( <Box {...rest}> {post.contents.map((content: Content, i) => { - switch (Object.keys(content)[0]) { - case 'text': + if ('text' in content) { return ( <TextContent key={i} @@ -35,9 +34,9 @@ function GraphContentWideInner( content={content} /> ); - case 'code': + } else if ('code' in content) { return <CodeContent key={i} content={content} />; - case 'reference': + } else if ('reference' in content) { const { link } = referenceToPermalink(content as ReferenceContent); return ( <PermalinkEmbed @@ -47,7 +46,7 @@ function GraphContentWideInner( showOurContact={showOurContact} /> ); - case 'url': + } else if ('url' in content) { return ( <Box key={i} @@ -65,18 +64,14 @@ function GraphContentWideInner( /> </Box> ); - case 'mention': + } else if ('mention' in content) { const first = i => i === 0; - return ( - <Mention + return (<Mention key={i} first={first(i)} ship={content.mention} api={api} - /> - ); - default: - return null; + />); } })} </Box>
Addiitional check - same conditions
@@ -1046,7 +1046,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam // chain if they are valid, and no more than a max reorg depth than the best header // chain we know about. send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && - StaleBlockRequestAllowed(mi->second, consensusParams) && (chainActive.Height() - mi->second->nHeight < Params().MaxReorganizationDepth()); + StaleBlockRequestAllowed(mi->second, consensusParams) && (chainActive.Height() - (mi->second->nHeight-1) < Params().MaxReorganizationDepth()); if (!send) { LogPrintf("%s: ignoring request from peer=%i for old block that isn't in the main chain\n", __func__, pfrom->GetId()); }
Avoid use of deprecated BIGNUM API.
# include <ifaddrs.h> #endif // !_WIN32 #ifdef HAVE_OPENSSL +# include <openssl/bn.h> # include <openssl/err.h> # include <openssl/ssl.h> # include <openssl/x509.h> @@ -1916,7 +1917,7 @@ tls_make_certificate( # ifdef HAVE_OPENSSL bool result = false; // Result of operations EVP_PKEY *pkey; // Private key - BIGNUM bn; // Public exponent for RSA keys + BIGNUM *rsaexp; // Public exponent for RSA keys RSA *rsa = NULL; // RSA key pair EC_KEY *ecdsa = NULL; // ECDSA key pair X509 *cert; // Certificate @@ -2054,18 +2055,20 @@ tls_make_certificate( if (!strcmp(level, "rsa-2048")) { // 2048-bit RSA key... - BN_init(&bn); - BN_set_word(&bn, RSA_F4); + rsaexp = BN_new(); + BN_set_word(rsaexp, RSA_F4); rsa = RSA_new(); - RSA_generate_key_ex(rsa, 2048, &bn, NULL); + RSA_generate_key_ex(rsa, 2048, rsaexp, NULL); + BN_free(rsaexp); } else if (!strcmp(level, "rsa-4096")) { // 4096-bit RSA key... - BN_init(&bn); - BN_set_word(&bn, RSA_F4); + rsaexp = BN_new(); + BN_set_word(rsaexp, RSA_F4); rsa = RSA_new(); - RSA_generate_key_ex(rsa, 4096, &bn, NULL); + RSA_generate_key_ex(rsa, 4096, rsaexp, NULL); + BN_free(rsaexp); } else { @@ -2313,7 +2316,7 @@ tls_make_certsignreq( # ifdef HAVE_OPENSSL bool result = false; // Result of operations EVP_PKEY *pkey; // Private key - BIGNUM bn; // Public exponent for RSA keys + BIGNUM *rsaexp; // Public exponent for RSA keys RSA *rsa = NULL; // RSA key pair EC_KEY *ecdsa = NULL; // ECDSA key pair X509_REQ *crq; // Certificate request @@ -2394,18 +2397,20 @@ tls_make_certsignreq( if (!strcmp(level, "rsa-2048")) { // 2048-bit RSA key... - BN_init(&bn); - BN_set_word(&bn, RSA_F4); + rsaexp = BN_new(); + BN_set_word(rsaexp, RSA_F4); rsa = RSA_new(); - RSA_generate_key_ex(rsa, 2048, &bn, NULL); + RSA_generate_key_ex(rsa, 2048, rsaexp, NULL); + BN_free(rsaexp); } else if (!strcmp(level, "rsa-4096")) { // 4096-bit RSA key... - BN_init(&bn); - BN_set_word(&bn, RSA_F4); + rsaexp = BN_new(); + BN_set_word(rsaexp, RSA_F4); rsa = RSA_new(); - RSA_generate_key_ex(rsa, 4096, &bn, NULL); + RSA_generate_key_ex(rsa, 4096, rsaexp, NULL); + BN_free(rsaexp); } else {
more of cycle
@@ -10,9 +10,11 @@ void cycle() Concept *c = Memory_getClosestConcept(&e); FIFO *fifo = e->type == EVENT_TYPE_BELIEF ? &c->event_beliefs : &c->event_goals; FIFO_AddAndRevise(e, fifo); - // e->attention = Attention_forgetTask(&e->attention); - // PriorityQueue_Push(&events, e-> - //todo there is more that needs to happen + e->attention = Attention_forgetTask(&e->attention); + PriorityQueue_Push_Feedback pushed = PriorityQueue_Push(&events, e->attention.priority); + Event *cpushed = pushed.addedItem.address; + *cpushed = *e; + //todo there is more that needs to happen for event-concept interaction, inference! :) } for(int i=0; i<concepts.itemsAmount; i++) //as all concepts are forgotten the order won't change { //making this operation very cheap, not demanding any heap operation
Fix palette select button preview when set to global default and global is DMG palette
@@ -8,6 +8,7 @@ import { SelectMenu, selectMenuStyleProps } from "../ui/form/Select"; import { RelativePortal } from "../ui/layout/RelativePortal"; import { PaletteSelect } from "./PaletteSelect"; import navigationActions from "../../store/features/navigation/navigationActions"; +import { DMG_PALETTE } from "../../consts"; type PaletteSelectProps = { name: string; @@ -74,9 +75,13 @@ export const PaletteSelectButton: FC<PaletteSelectProps> = ({ }) => { const buttonRef = useRef<HTMLButtonElement>(null); const timerRef = useRef<number | null>(null); - const palette = useSelector((state: RootState) => - paletteSelectors.selectById(state, value || optionalDefaultPaletteId || "") - ); + const palette = + useSelector((state: RootState) => + paletteSelectors.selectById( + state, + value || optionalDefaultPaletteId || "" + ) + ) || DMG_PALETTE; const [isOpen, setIsOpen] = useState<boolean>(false); const [buttonFocus, setButtonFocus] = useState<boolean>(false); const dispatch = useDispatch();
fixed memory bug in output.c
@@ -1556,7 +1556,7 @@ void WriteOutput(BODY *body,CONTROL *control,FILES *files,OUTPUT *output,SYSTEM fprintf(fp,"\n"); fclose(fp); } - // XXX Module-specific output should NOT be present in this file + // XXX Pizza should NOT be present in this file /* Grid outputs, currently only set up for POISE */ if (body[iBody].bPoise) { @@ -1680,8 +1680,8 @@ void WriteOutput(BODY *body,CONTROL *control,FILES *files,OUTPUT *output,SYSTEM } } - if (control->bOutputEigen) { if (body[1].bDistOrb) { + if (control->bOutputEigen) { if (control->Evolve.iDistOrbModel == RD4) { SolveEigenVal(body,&control->Evolve,system); }
mqtt/docs: Mention removal of user_context in 5.x migration guide update CN for migration-guides/release-5.x/5.0/protocols.rst Closes
@@ -177,9 +177,11 @@ Most common configurations are listed below: - Security related to broker verification in :cpp:member:`esp_mqtt_client_config_t::broker::verification` - Client username is set in :cpp:member:`esp_mqtt_client_config_t::credentials::username` +- :cpp:type:`esp_mqtt_client_config_t` no longer supports the ``user_context`` field. Please use :cpp:func:`esp_mqtt_client_register_event` instead for registering an event handler; the last argument ``event_handler_arg`` can be used to pass user context to the handler. + ESP-Modbus ----------- +----------- Breaking Changes (Summary) ~~~~~~~~~~~~~~~~~~~~~~~~~~
utests MAINTAINCE add test for anydata containing character <.
@@ -166,8 +166,19 @@ test_anydata(void **state) " </cont>\n" "</any>\n"; CHECK_LYD_STRING(tree, LYD_PRINT_WITHSIBLINGS, data); + lyd_free_all(tree); + data = "<any xmlns=\"urn:tests:types\">\n" + " <cont>\n" + " <elem1 xmlns=\"urn:tests:defs\" attr=\"&lt;test\">\n" + " ahoj jak se vede &lt; how are you" + " </elem1>\n" + " </cont>\n" + "</any>\n"; + CHECK_PARSE_LYD(data, 0, LYD_VALIDATE_PRESENT, tree); + CHECK_LYD_STRING(tree, LYD_PRINT_WITHSIBLINGS, data); lyd_free_all(tree); + } static void
Update tests/suites/test_suite_ecdsa.function
@@ -479,9 +479,7 @@ void ecdsa_verify( int grp_id, char * x, char * y, char * r, char * s, data_t * mbedtls_mpi_init( &sig_s ); /* Prepare ECP group context */ - curve_info = mbedtls_ecp_curve_info_from_grp_id( grp_id ); - TEST_ASSERT( curve_info != NULL ); - TEST_EQUAL( mbedtls_ecp_group_load( &ctx.grp, curve_info->grp_id ), 0 ); + TEST_EQUAL( mbedtls_ecp_group_load( &ctx.grp, grp_id ), 0 ); /* Prepare public key */ TEST_EQUAL( mbedtls_test_read_mpi( &ctx.Q.X, x ), 0 );
Fixing syntax error in makefile Fixing syntax issue in Makefile.power added by recent commit
@@ -12,7 +12,7 @@ endif ifeq ($(CORE), POWER10) ifneq ($(C_COMPILER), PGI) CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math -ifeq ($(F_COMPILER, IBM) +ifeq ($(F_COMPILER), IBM) FCOMMON_OPT += -O2 -qrecur -qnosave else FCOMMON_OPT += -O2 -frecursive -mcpu=power10 -mtune=power10 -fno-fast-math
Install espresso in build-toolchain-extra.sh
@@ -102,6 +102,14 @@ CC= CXX= module_all riscv-pk --prefix="${RISCV}" --host=riscv${XLEN}-unknown-elf echo '==> Installing RISC-V tests' module_all riscv-tests --prefix="${RISCV}/riscv${XLEN}-unknown-elf" --with-xlen=${XLEN} +echo '==> Installing espresso logic minimizer' +( + cd $RDIR + git submodule update --init --checkout generators/constellation + cd generators/constellation + scripts/install-espresso.sh $RISCV +) + # Common tools (not in any particular toolchain dir) echo '==> Installing libgloss'
stm32/powerctrl: Disable RTC write protection before changing flags.
@@ -689,6 +689,10 @@ void powerctrl_enter_standby_mode(void) { // save RTC interrupts uint32_t save_irq_bits = RTC->CR & CR_BITS; + // disable register write protection + RTC->WPR = 0xca; + RTC->WPR = 0x53; + // disable RTC interrupts RTC->CR &= ~CR_BITS; @@ -714,6 +718,9 @@ void powerctrl_enter_standby_mode(void) { // enable previously-enabled RTC interrupts RTC->CR |= save_irq_bits; + // enable register write protection + RTC->WPR = 0xff; + #if defined(STM32F7) // Enable the internal (eg RTC) wakeup sources // See Errata 2.2.2 "Wakeup from Standby mode when the back-up SRAM regulator is enabled"
sign method rework for native message bytes
@@ -626,9 +626,6 @@ public final class WalletConnector { return Result.failure(WalletConnectorError(core: status)) } - let digestData = Data(bytes: digestBytes!, count: digestLength) - return digestData.withUnsafeBytes { (digestDataBytes: UnsafeRawBufferPointer) -> Result<(digest: Digest?, signature: Signature), WalletConnectorError> in - var signatureLength: size_t = 0 let signatureBytes = wkWalletConnectorSignData(self.core, finalMessageAddr, @@ -642,13 +639,13 @@ public final class WalletConnector { } let signatureData = Data(bytes: signatureBytes!, count: signatureLength) + let digestData = Data(bytes: digestBytes!, count: digestLength) let digest = Digest(core: self.core, data32: digestData) let signature = Signature(core: self.core, data: signatureData) return Result.success((digest: digest, signature: signature)) } } - } /// /// Recover the public key
bumping openmpi version to v1.10.6
@@ -66,7 +66,7 @@ Name: %{pname}-psm2-%{compiler_family}%{PROJ_DELIM} Name: %{pname}-%{compiler_family}%{PROJ_DELIM} %endif -Version: 1.10.4 +Version: 1.10.6 Release: 1 License: BSD-3-Clause Group: %{PROJ_NAME}/mpi-families
Add missing ECN handling for delayed handshake packets
@@ -6794,10 +6794,10 @@ static int conn_recv_non_probing_pkt_on_new_path(ngtcp2_conn *conn, * Frame that is not allowed in Handshake packet is received. */ static int -conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_hd *hd, - size_t pktlen, const uint8_t *payload, - size_t payloadlen, ngtcp2_tstamp pkt_ts, - ngtcp2_tstamp ts) { +conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_info *pi, + const ngtcp2_pkt_hd *hd, size_t pktlen, + const uint8_t *payload, size_t payloadlen, + ngtcp2_tstamp pkt_ts, ngtcp2_tstamp ts) { ngtcp2_ssize nread; ngtcp2_max_frame mfr; ngtcp2_frame *fr = &mfr.fr; @@ -6869,7 +6869,10 @@ conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_hd *hd, return rv; } - if (require_ack && ++pktns->acktr.rx_npkt >= NGTCP2_NUM_IMMEDIATE_ACK_PKT) { + pktns_increase_ecn_counts(pktns, pi); + + if (require_ack && (++pktns->acktr.rx_npkt >= NGTCP2_NUM_IMMEDIATE_ACK_PKT || + (pi->ecn & NGTCP2_ECN_MASK) == NGTCP2_ECN_CE)) { ngtcp2_acktr_immediate_ack(&pktns->acktr); } @@ -7159,7 +7162,7 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, return NGTCP2_ERR_DISCARD_PKT; } - rv = conn_recv_delayed_handshake_pkt(conn, &hd, pktlen, payload, + rv = conn_recv_delayed_handshake_pkt(conn, pi, &hd, pktlen, payload, payloadlen, pkt_ts, ts); if (rv < 0) { return (ngtcp2_ssize)rv;
pybricks.hubs.MoveHub.imu: implement up
@@ -138,6 +138,49 @@ static void motion_get_acceleration(int8_t *data) { data[1] = -data[1]; } +// This is an integer version of pybricks._common.IMU.up +STATIC mp_obj_t hubs_MoveHub_IMU_up(mp_obj_t self_in) { + + int8_t values[3]; + motion_get_acceleration(values); + + // Find index and sign of maximum component + int8_t abs_max = 0; + uint8_t axis = 0; + bool positive = false; + for (uint8_t i = 0; i < 3; i++) { + if (values[i] > abs_max) { + abs_max = values[i]; + positive = true; + axis = i; + } else if (-values[i] > abs_max) { + abs_max = -values[i]; + positive = false; + axis = i; + } + } + + // Convert axis and sign to side + if (axis == 0 && positive) { + return MP_OBJ_FROM_PTR(&pb_Side_FRONT_obj); + } + if (axis == 0 && !positive) { + return MP_OBJ_FROM_PTR(&pb_Side_BACK_obj); + } + if (axis == 1 && positive) { + return MP_OBJ_FROM_PTR(&pb_Side_LEFT_obj); + } + if (axis == 1 && !positive) { + return MP_OBJ_FROM_PTR(&pb_Side_RIGHT_obj); + } + if (axis == 2 && positive) { + return MP_OBJ_FROM_PTR(&pb_Side_TOP_obj); + } else { + return MP_OBJ_FROM_PTR(&pb_Side_BOTTOM_obj); + } +} +MP_DEFINE_CONST_FUN_OBJ_1(hubs_MoveHub_IMU_up_obj, hubs_MoveHub_IMU_up); + STATIC mp_obj_t hubs_MoveHub_IMU_acceleration(mp_obj_t self_in) { // Gets signed acceleration data @@ -155,6 +198,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(hubs_MoveHub_IMU_acceleration_obj, hubs_MoveHub STATIC const mp_rom_map_elem_t hubs_MoveHub_IMU_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_acceleration), MP_ROM_PTR(&hubs_MoveHub_IMU_acceleration_obj) }, + { MP_ROM_QSTR(MP_QSTR_up), MP_ROM_PTR(&hubs_MoveHub_IMU_up_obj) }, }; STATIC MP_DEFINE_CONST_DICT(hubs_MoveHub_IMU_locals_dict, hubs_MoveHub_IMU_locals_dict_table);
Check shaderblock offset exists before reading. Prevents a segfault
@@ -19,8 +19,9 @@ static int l_lovrShaderBlockGetSize(lua_State* L) { static int l_lovrShaderBlockGetOffset(lua_State* L) { ShaderBlock* block = luax_checktype(L, 1, ShaderBlock); - const char* field = luaL_checkstring(L, 2); - const Uniform* uniform = lovrShaderBlockGetUniform(block, field); + const char* name = luaL_checkstring(L, 2); + const Uniform* uniform = lovrShaderBlockGetUniform(block, name); + lovrAssert(uniform, "Unknown uniform for ShaderBlock '%s'", name); lua_pushinteger(L, uniform->offset); return 1; }
app_http_tls_cb: Fix double-free in case TLS not used
@@ -2464,9 +2464,10 @@ static const char *tls_error_hint(void) /* HTTP callback function that supports TLS connection also via HTTPS proxy */ BIO *app_http_tls_cb(BIO *bio, void *arg, int connect, int detail) { - if (connect && detail) { /* connecting with TLS */ APP_HTTP_TLS_INFO *info = (APP_HTTP_TLS_INFO *)arg; SSL_CTX *ssl_ctx = info->ssl_ctx; + + if (connect && detail) { /* connecting with TLS */ SSL *ssl; BIO *sbio = NULL; @@ -2500,6 +2501,7 @@ BIO *app_http_tls_cb(BIO *bio, void *arg, int connect, int detail) if (hint != NULL) ERR_add_error_data(2, " : ", hint); } + if (ssl_ctx != NULL) { (void)ERR_set_mark(); BIO_ssl_shutdown(bio); cbio = BIO_pop(bio); /* connect+HTTP BIO */ @@ -2507,6 +2509,7 @@ BIO *app_http_tls_cb(BIO *bio, void *arg, int connect, int detail) (void)ERR_pop_to_mark(); /* hide SSL_R_READ_BIO_NOT_SET etc. */ bio = cbio; } + } return bio; }
add 'c' to 'msqui'
@@ -4,7 +4,7 @@ lttng destroy msquic 2> /dev/null dirname="msquic_lttng" num=`find ./* -maxdepth 0 -name "$dirname*" | wc -l` -mkdir $dirname$num && lttng create msqui -o=./$dirname$num && sessionCreated=$? && lttng enable-event --userspace "CLOG_*" && lttng add-context --userspace --type=vpid --type=vtid && lttng start +mkdir $dirname$num && lttng create msquic -o=./$dirname$num && sessionCreated=$? && lttng enable-event --userspace "CLOG_*" && lttng add-context --userspace --type=vpid --type=vtid && lttng start if [ $? -eq 0 ]; then $* lttng stop
Bitcoin Accounts are deprecated and should not be used.
@@ -227,13 +227,10 @@ namespace MiningCore.Blockchain.Bitcoin return; logger.Info(() => $"[{LogCategory}] Paying out {FormatAmount(balances.Sum(x => x.Amount))} to {balances.Length} addresses"); - var addressName = poolConfig.Extra?.ContainsKey("addressName") == true - ? poolConfig.Extra["addressName"] //name of account where balance is held - : string.Empty; // default account var args = new object[] { - addressName, + string.Empty, amounts // addresses and associated amounts };
Use one mutex to lock both concept file and template
@@ -728,16 +728,16 @@ static grib_action* grib_parse_stream(grib_context* gc, const char* filename) grib_concept_value* grib_parse_concept_file( grib_context* gc,const char* filename) { GRIB_MUTEX_INIT_ONCE(&once,&init); - GRIB_MUTEX_LOCK(&mutex_concept); + GRIB_MUTEX_LOCK(&mutex_file); gc = gc ? gc : grib_context_get_default(); grib_parser_context = gc; if(parse(gc,filename) == 0) { - GRIB_MUTEX_UNLOCK(&mutex_concept); + GRIB_MUTEX_UNLOCK(&mutex_file); return grib_parser_concept; } else { - GRIB_MUTEX_UNLOCK(&mutex_concept); + GRIB_MUTEX_UNLOCK(&mutex_file); return NULL; } }
Fix main heap cookie on macOS
@@ -364,7 +364,9 @@ void mi_process_init(void) mi_attr_noexcept { _mi_heap_main.thread_id = _mi_thread_id(); _mi_verbose_message("process init: 0x%zx\n", _mi_heap_main.thread_id); uintptr_t random = _mi_random_init(_mi_heap_main.thread_id) ^ (uintptr_t)h; + #ifndef __APPLE _mi_heap_main.cookie = (uintptr_t)&_mi_heap_main ^ random; + #endif _mi_heap_main.random = _mi_random_shuffle(random); #if (MI_DEBUG) _mi_verbose_message("debug level : %d\n", MI_DEBUG);
CC1200 set_channel: compute channel within bounds from any input channel
@@ -2115,6 +2115,9 @@ set_channel(uint8_t channel) uint8_t was_off = 0; uint32_t freq; + channel %= (CC1200_RF_CFG.max_channel - CC1200_RF_CFG.min_channel + 1); + channel += CC1200_RF_CFG.min_channel; + #if 0 /* * We explicitly allow a channel update even if the channel does not change.
fix acceleration_interval 0 bug
@@ -739,6 +739,10 @@ static scs_int validate(const ScsData *d, const ScsCone *k, scs_printf("scale must be positive (1 works well).\n"); return -1; } + if (stgs->acceleration_interval <= 0) { + scs_printf("acceleration_interval must be positive (10 works well).\n"); + return -1; + } return 0; } #endif
Remove -x from cibuild.sh call in CI since this will abort the build on first error and we do not want that.
@@ -162,7 +162,7 @@ jobs: with: run: | cd sources/testing - ./cibuild.sh -x testlist/${{matrix.boards}}.dat + ./cibuild.sh testlist/${{matrix.boards}}.dat macOS: runs-on: macos-10.15 @@ -202,4 +202,4 @@ jobs: - name: Run Builds run: | cd sources/testing - ./cibuild.sh -i -x testlist/${{matrix.boards}}.dat + ./cibuild.sh -i testlist/${{matrix.boards}}.dat
i2c: modify internal impl to ensure the cmd will not be modified related to:
@@ -1142,9 +1142,9 @@ static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num) #if CONFIG_SPIRAM_USE_MALLOC //Check whether read or write buffer in cmd_link is internal. -static bool is_cmd_link_buffer_internal(i2c_cmd_link_t *link) +static bool is_cmd_link_buffer_internal(const i2c_cmd_link_t *link) { - i2c_cmd_link_t *cmd_link = link; + const i2c_cmd_link_t *cmd_link = link; while (cmd_link != NULL) { if (cmd_link->cmd.hw_cmd.op_code == I2C_LL_CMD_WRITE || cmd_link->cmd.hw_cmd.op_code == I2C_LL_CMD_READ) { if (cmd_link->cmd.data != NULL && !esp_ptr_internal(cmd_link->cmd.data)) { @@ -1168,7 +1168,7 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle, //If the i2c read or write buffer is not in internal RAM, we will return ESP_FAIL //to avoid the ISR handler function crashing when the cache is disabled. if ((p_i2c_obj[i2c_num]->intr_alloc_flags & ESP_INTR_FLAG_IRAM)) { - if (!is_cmd_link_buffer_internal(((i2c_cmd_desc_t *)cmd_handle)->head) ) { + if (!is_cmd_link_buffer_internal(((const i2c_cmd_desc_t *)cmd_handle)->head) ) { ESP_LOGE(I2C_TAG, I2C_PSRAM_BUFFER_WARN_STR); return ESP_ERR_INVALID_ARG; } @@ -1194,7 +1194,7 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle, } i2c_reset_tx_fifo(i2c_num); i2c_reset_rx_fifo(i2c_num); - i2c_cmd_desc_t *cmd = (i2c_cmd_desc_t *) cmd_handle; + const i2c_cmd_desc_t *cmd = (const i2c_cmd_desc_t *) cmd_handle; p_i2c->cmd_link.free = cmd->free; p_i2c->cmd_link.cur = cmd->cur; p_i2c->cmd_link.head = cmd->head;
Limit the reporting of closed streams, so as to reduce the number of printf calls.
@@ -361,11 +361,13 @@ int picoquic_demo_client_callback(picoquic_cnx_t* cnx, if (fin_or_event == picoquic_callback_stream_fin) { if (picoquic_demo_client_close_stream(ctx, stream_ctx)) { fin_stream_id = stream_id; + if (stream_id <= 64) { fprintf(stdout, "Stream %d ended after %d bytes\n", (int)stream_id, (int)stream_ctx->received_length); } } } + } break; case picoquic_callback_stream_reset: /* Server reset stream #x */ case picoquic_callback_stop_sending: /* Server asks client to reset stream #x */
Change default value of INCLUDE_xTaskGetCurrentTaskHandle
#endif #ifndef INCLUDE_xTaskGetCurrentTaskHandle - #define INCLUDE_xTaskGetCurrentTaskHandle 0 + #define INCLUDE_xTaskGetCurrentTaskHandle 1 #endif #if configUSE_CO_ROUTINES != 0
add minimal firesim configs for testing fpga sims
@@ -62,12 +62,8 @@ class WithNIC extends icenet.WithIceNIC(inBufFlits = 8192, ctrlQueueDepth = 64) class WithNVDLALarge extends nvidia.blocks.dla.WithNVDLA("large") class WithNVDLASmall extends nvidia.blocks.dla.WithNVDLA("small") -// Non-frequency tweaks that are generally applied to all firesim configs -class WithFireSimDesignTweaks extends Config( - // Optional: reduce the width of the Serial TL interface - new testchipip.WithSerialTLWidth(4) ++ - // Required: Bake in the default FASED memory model - new WithDefaultMemModel ++ +// Minimal set of FireSim-related design tweaks - notably discludes FASED, TraceIO, and the BlockDevice +class WithMinimalFireSimDesignTweaks extends Config( // Required*: Uses FireSim ClockBridge and PeekPokeBridge to drive the system with a single clock/reset new WithFireSimHarnessClockBinder ++ new WithFireSimSimpleClocks ++ @@ -77,16 +73,25 @@ class WithFireSimDesignTweaks extends Config( new WithoutClockGating ++ // Required*: Removes thousands of assertions that would be synthesized (* pending PriorityMux bugfix) new WithoutTLMonitors ++ + // Required: Do not support debug module w. JTAG until FIRRTL stops emitting @(posedge ~clock) + new chipyard.config.WithNoDebug +) + +// Non-frequency tweaks that are generally applied to all firesim configs +class WithFireSimDesignTweaks extends Config( + new WithMinimalFireSimDesignTweaks ++ + // Required: Bake in the default FASED memory model + new WithDefaultMemModel ++ + // Optional: reduce the width of the Serial TL interface + new testchipip.WithSerialTLWidth(4) ++ + // Required*: Scale default baud rate with periphery bus frequency + new chipyard.config.WithUART(BigInt(3686400L)) ++ // Optional: Adds IO to attach tracerV bridges new chipyard.config.WithTraceIO ++ // Optional: Request 16 GiB of target-DRAM by default (can safely request up to 32 GiB on F1) new freechips.rocketchip.subsystem.WithExtMemSize((1 << 30) * 16L) ++ // Optional: Removing this will require using an initramfs under linux - new testchipip.WithBlockDevice ++ - // Required*: Scale default baud rate with periphery bus frequency - new chipyard.config.WithUART(BigInt(3686400L)) ++ - // Required: Do not support debug module w. JTAG until FIRRTL stops emitting @(posedge ~clock) - new chipyard.config.WithNoDebug + new testchipip.WithBlockDevice ) // Tweaks to modify target clock frequencies / crossings to legacy firesim defaults @@ -125,6 +130,15 @@ class WithFireSimTestChipConfigTweaks extends Config( new WithFireSimDesignTweaks ) +// Tweaks to use minimal design tweaks +// Need to use initramfs to use linux (no block device) +class WithMinimalFireSimHighPerfConfigTweaks extends Config( + new WithFireSimHighPerfClocking ++ + new freechips.rocketchip.subsystem.WithNoMemPort ++ + new testchipip.WithBackingScratchpad ++ + new WithMinimalFireSimDesignTweaks +) + // Tweaks for legacy FireSim configs. class WithFireSimHighPerfConfigTweaks extends Config( new WithFireSimHighPerfClocking ++
Changed order of struct initializer to avoid compiler error
@@ -86,8 +86,8 @@ typedef struct .depth = _depth, \ .item_size = sizeof(_type), \ .overwritable = _overwritable, \ - .max_pointer_idx = 2*(_depth)-1, \ .non_used_index_space = UINT16_MAX - (2*(_depth)-1), \ + .max_pointer_idx = 2*(_depth)-1, \ } #define TU_FIFO_DEF(_name, _depth, _type, _overwritable) \
[libcpu]modify GPL license to Apache 2.0
#ifndef __ARMV7_H__ #define __ARMV7_H__ /* - * COPYRIGHT (C) 2013-2014, Shanghai Real-Thread Technology Co., Ltd + * Copyright (c) 2006-2021, RT-Thread Development Team * - * All rights reserved. + * SPDX-License-Identifier: Apache-2.0 * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef VFP_DATA_NR
More phtread fixes
@@ -683,7 +683,7 @@ static void picoquic_set_abs_delay(struct timespec* ts, uint64_t microsec_wait) clock_gettime(CLOCK_REALTIME, ts); ts->tv_sec += (unsigned long)(microsec_wait / 1000000); ts->tv_nsec += (unsigned long)((microsec_wait % 1000000)*1000); - if (ts->tv_usec > 1000000000) { + if (ts->tv_nsec > 1000000000) { ts->tv_sec++; ts->tv_nsec -= 1000000000; } @@ -716,7 +716,7 @@ void picoquic_delete_thread(picoquic_thread_t * thread) CloseHandle(*thread); *thread = NULL; #else - if (pthread_join(thread, NULL) != 0) { + if (pthread_join(*thread, NULL) != 0) { (void)pthread_cancel(*thread); } #endif
Add Julia installation docs
Julia ===== -TODO + +Install SCS via the Julia package manager: + +.. code:: julia + + import Pkg + Pkg.add("SCS") + +This will install the `SCS.jl <https://github.com/jump-dev/SCS.jl>`_ +package, along with the necessary SCS binary for your system. + +For instructions on how to use a custom version of SCS, consult the +`SCS.jl README <https://github.com/jump-dev/SCS.jl>`_.
cmake : Allow projects outside AFR source tree to link IDF component libraries This should also fix support for adding extra components by setting IDF_EXTRA_COMPONENT_DIRS Also corrected IDF_PATH supplied to `monitor` target
@@ -255,13 +255,28 @@ set(IDF_BUILD_ARTIFACTS_DIR ${CMAKE_BINARY_DIR}) set(CMAKE_STATIC_LIBRARY_PREFIX "lib") +# If external project is set do not link IDF components to aws target +if (NOT IDF_PROJECT_EXECUTABLE) + set(IDF_PROJECT_EXECUTABLE ${exe_target}) +endif() + +set_property(GLOBAL PROPERTY IDF_PROJECT_EXECUTABLE ${IDF_PROJECT_EXECUTABLE}) + +get_filename_component( + ABS_EXTRA_COMPONENT_DIRS + "${board_dir}/application_code/espressif_code" ABSOLUTE +) + +list(APPEND IDF_EXTRA_COMPONENT_DIRS ${ABS_EXTRA_COMPONENT_DIRS}) + # This is a hack to have IDF build system use PRIVATE keyword when # calling target_link_libraries() on aws_demos target. This is necessary # as CMake doesn't allow mixing target_link_libraries() call signature # for the same target. function(target_link_libraries) set(_args ARGV) - if ((${ARGV0} STREQUAL aws_tests) OR (${ARGV0} STREQUAL aws_demos)) + get_property(exe_target GLOBAL PROPERTY IDF_PROJECT_EXECUTABLE) + if (${ARGV0} STREQUAL ${exe_target}) list(INSERT ${_args} 1 PRIVATE) endif() _target_link_libraries(${${_args}}) @@ -273,27 +288,18 @@ set(IDF_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) # Provides idf_import_components and idf_link_components include(${esp_idf_dir}/tools/cmake/idf_functions.cmake) -get_filename_component( - ABS_EXTRA_COMPONENT_DIRS - "${board_dir}/application_code/espressif_code" ABSOLUTE -) - -set(IDF_EXTRA_COMPONENT_DIRS ${ABS_EXTRA_COMPONENT_DIRS}) -set(IDF_PROJECT_EXECUTABLE ${exe_target}) - - # Wraps add_subdirectory() to create library targets for components, and then `return` them using the given variable. # In this case the variable is named `component` idf_import_components(components ${esp_idf_dir} esp-idf) # Wraps target_link_libraries() to link processed components by idf_import_components to target -idf_link_components(${exe_target} "${components}") +idf_link_components(${IDF_PROJECT_EXECUTABLE} "${components}") # Monitor target for running idf_monitor.py add_custom_target(monitor DEPENDS "${IDF_PROJECT_EXECUTABLE}" COMMAND ${CMAKE_COMMAND} - -D IDF_PATH="${espressif_dir}" + -D IDF_PATH="${esp_idf_dir}" -D PROJECT_ELF="${IDF_PROJECT_EXECUTABLE}" -D ELF_DIR="${CMAKE_BINARY_DIR}" -P run_idf_monitor.cmake
remove comments in Chinese and keep the code style
/* - * Copyright (c) 2006-2019, RT-Thread Development Team + * Copyright (c) 2006-2020, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 *
chore(docs) handle version names without dots
@@ -20,10 +20,11 @@ function add_version_selector() .then(res => res.text()) .then(text => { const versions = text.split("\n").filter(version => version.trim().length > 0); - p = document.getElementById("rtd-search-form").parentElement; + let p = document.getElementById("rtd-search-form").parentElement; + const versionName = (version.indexOf(".") != -1) ? version : (version + " (latest minor)"); p.innerHTML = ` <select name="versions" id="versions" onchange="ver_sel()" style="border-radius:5px; margin-bottom:15px"> - ${versions.map(version => `<option value="${version}">${version}</option>`)} + ${versions.map(version => `<option value="${version}">${versionName}</option>`)} </select>` + p.innerHTML; }); }
vlib: remove unused simple counters fields Type: improvement
typedef struct { counter_t **counters; /**< Per-thread u64 non-atomic counters */ - counter_t *value_at_last_serialize; /**< Values as of last serialize. */ - u32 last_incremental_serialize_index; /**< Last counter index - serialized incrementally. */ - char *name; /**< The counter collection's name. */ char *stat_segment_name; /**< Name in stat segment directory */ } vlib_simple_counter_main_t; @@ -207,8 +203,6 @@ vlib_counter_zero (vlib_counter_t * a) typedef struct { vlib_counter_t **counters; /**< Per-thread u64 non-atomic counter pairs */ - vlib_counter_t *value_at_last_serialize; /**< Counter values as of last serialize. */ - u32 last_incremental_serialize_index; /**< Last counter index serialized incrementally. */ char *name; /**< The counter collection's name. */ char *stat_segment_name; /**< Name in stat segment directory */ } vlib_combined_counter_main_t;
Simplify futures.
use std -use "mutex" -use "condvar" -use "atomic" +use "sem" pkg thread = type future(@a) = struct - mtx : mutex - cv : cond - set : bool + sem : sem val : @a ;; generic mkfut : (-> future(@a)#) generic futput : (fut : future(@a)#, val : @a -> void) generic futget : (fut : future(@a)# -> @a) - generic futpeek : (fut : future(@a)# -> @a) ;; generic mkfut = { - var fut - - fut = std.alloc() - fut.mtx = mkmtx() - fut.cv = mkcond(&fut.mtx) - fut.set = false - -> fut + -> std.mk([.sem = mksem(0)]) } generic futput = {fut, val fut.val = val - xset(&fut.set, true) - condsignal(&fut.cv) + sempost(&fut.sem) } generic futget = {fut var val - val = futpeek(fut) + semwait(&fut.sem) + val = fut.val std.free(fut) -> val } -generic futpeek = {fut - if !xget(&fut.set) - mtxlock(&fut.mtx) - if !xget(&fut.set) - condwait(&fut.cv) - ;; - mtxunlock(&fut.mtx) - ;; - -> fut.val -} -
Add container name to docker compose.
@@ -8,6 +8,7 @@ version: "3" services: deps: image: metacall/core:deps + container_name: metacall_core_deps build: context: tools dockerfile: Dockerfile.deps @@ -21,6 +22,7 @@ services: core: image: metacall/core + container_name: metacall_core build: context: . dockerfile: Dockerfile
Rename -nokvm to -noaccel. Add support for hvf acceleration on macOS
@@ -61,17 +61,17 @@ distclean: clean ############################################################################## # tests -.PHONY: test test-nokvm +.PHONY: test test-noaccel -test test-nokvm: mkfs boot stage3 +test test-noaccel: mkfs boot stage3 $(Q) $(MAKE) -C test test $(Q) $(MAKE) runtime-tests$(subst test,,$@) RUNTIME_TESTS= creat fst getdents getrandom hw hws mkdir pipe write -.PHONY: runtime-tests runtime-tests-nokvm +.PHONY: runtime-tests runtime-tests-noaccel -runtime-tests runtime-tests-nokvm: +runtime-tests runtime-tests-noaccel: $(foreach t,$(RUNTIME_TESTS),$(call execute_command,$(Q) $(MAKE) run$(subst runtime-tests,,$@) TARGET=$t)) ############################################################################## @@ -89,18 +89,17 @@ QEMU_STORAGE+= -device virtio-scsi-pci,id=scsi0 -device scsi-hd,bus=scsi0.0,driv QEMU_TAP= -netdev tap,id=n0,ifname=tap0,script=no,downscript=no QEMU_NET= -device virtio-net,mac=7e:b8:7e:87:4a:ea,netdev=n0 $(QEMU_TAP) QEMU_USERNET= -device virtio-net,netdev=n0 -netdev user,id=n0,hostfwd=tcp::8080-:8080,hostfwd=tcp::9090-:9090,hostfwd=udp::5309-:5309 -QEMU_KVM= -enable-kvm QEMU_FLAGS= QEMU_COMMON= $(QEMU_DISPLAY) $(QEMU_MEMORY) $(QEMU_STORAGE) -device isa-debug-exit -no-reboot $(QEMU_FLAGS) run: image - $(QEMU) $(QEMU_COMMON) $(QEMU_USERNET) $(QEMU_KVM) || exit $$(($$?>>1)) + $(QEMU) $(QEMU_COMMON) $(QEMU_USERNET) $(QEMU_ACCEL) || exit $$(($$?>>1)) run-bridge: image - $(QEMU) $(QEMU_COMMON) $(QEMU_NET) $(QEMU_KVM) || exit $$(($$?>>1)) + $(QEMU) $(QEMU_COMMON) $(QEMU_NET) $(QEMU_ACCEL) || exit $$(($$?>>1)) -run-nokvm: image +run-noaccel: image $(QEMU) $(QEMU_COMMON) $(QEMU_USERNET) || exit $$(($$?>>1)) ############################################################################## @@ -133,10 +132,12 @@ gce-console: include rules.mk -ifeq ($(UNAME_s),Linux) -REL_OS= linux -endif - ifeq ($(UNAME_s),Darwin) REL_OS= darwin +QEMU_ACCEL= -accel $(ACCEL) +ACCEL?= hvf +# ACCEL=? hax +else +REL_OS= linux +QEMU_ACCEL= -accel kvm endif
fixed typo in create_ip: set BLOCK_RAM B port to 256
@@ -76,7 +76,7 @@ if { $ddr3_used == TRUE } { if { $bram_used == TRUE } { #create BlockRAM create_ip -name blk_mem_gen -vendor xilinx.com -library ip -version 8.3 -module_name block_RAM -dir $ip_dir - set_property -dict [list CONFIG.Interface_Type {AXI4} CONFIG.Write_Width_A {256} CONFIG.AXI_ID_Width $axi_id_width CONFIG.Write_Depth_A {8129} CONFIG.Use_AXI_ID {true} CONFIG.Memory_Type {Simple_Dual_Port_RAM} CONFIG.Use_Byte_Write_Enable {true} CONFIG.Byte_Size {8} CONFIG.Assume_Synchronous_Clk {true} CONFIG.Read_Width_A {256} CONFIG.Operating_Mode_A {READ_FIRST} CONFIG.Write_Width_B {128} CONFIG.Read_Width_B {128} CONFIG.Operating_Mode_B {READ_FIRST} CONFIG.Enable_B {Use_ENB_Pin} CONFIG.Register_PortA_Output_of_Memory_Primitives {false} CONFIG.Use_RSTB_Pin {true} CONFIG.Reset_Type {ASYNC} CONFIG.Port_B_Clock {100} CONFIG.Port_B_Enable_Rate {100}] [get_ips block_RAM] + set_property -dict [list CONFIG.Interface_Type {AXI4} CONFIG.Write_Width_A {256} CONFIG.AXI_ID_Width $axi_id_width CONFIG.Write_Depth_A {8129} CONFIG.Use_AXI_ID {true} CONFIG.Memory_Type {Simple_Dual_Port_RAM} CONFIG.Use_Byte_Write_Enable {true} CONFIG.Byte_Size {8} CONFIG.Assume_Synchronous_Clk {true} CONFIG.Read_Width_A {256} CONFIG.Operating_Mode_A {READ_FIRST} CONFIG.Write_Width_B {256} CONFIG.Read_Width_B {256} CONFIG.Operating_Mode_B {READ_FIRST} CONFIG.Enable_B {Use_ENB_Pin} CONFIG.Register_PortA_Output_of_Memory_Primitives {false} CONFIG.Use_RSTB_Pin {true} CONFIG.Reset_Type {ASYNC} CONFIG.Port_B_Clock {100} CONFIG.Port_B_Enable_Rate {100}] [get_ips block_RAM] set_property generate_synth_checkpoint false [get_files $ip_dir/block_RAM/block_RAM.xci] generate_target {instantiation_template} [get_files $ip_dir/block_RAM/block_RAM.xci] generate_target all [get_files $ip_dir/block_RAM/block_RAM.xci]
gtpu: don't register udp ports unless a tunnel is created
@@ -620,6 +620,17 @@ int vnet_gtpu_add_del_tunnel if (sw_if_indexp) *sw_if_indexp = sw_if_index; + if (a->is_add) + { + /* register udp ports */ + if (!is_ip6 && !udp_is_valid_dst_port (UDP_DST_PORT_GTPU, 1)) + udp_register_dst_port (gtm->vlib_main, UDP_DST_PORT_GTPU, + gtpu4_input_node.index, /* is_ip4 */ 1); + if (is_ip6 && !udp_is_valid_dst_port (UDP_DST_PORT_GTPU6, 0)) + udp_register_dst_port (gtm->vlib_main, UDP_DST_PORT_GTPU6, + gtpu6_input_node.index, /* is_ip4 */ 0); + } + return 0; } @@ -1102,11 +1113,6 @@ gtpu_init (vlib_main_t * vm) sizeof (ip46_address_t), sizeof (mcast_shared_t)); - udp_register_dst_port (vm, UDP_DST_PORT_GTPU, - gtpu4_input_node.index, /* is_ip4 */ 1); - udp_register_dst_port (vm, UDP_DST_PORT_GTPU6, - gtpu6_input_node.index, /* is_ip4 */ 0); - gtm->fib_node_type = fib_node_register_new_type (&gtpu_vft); return 0;
flash_fp_mcu: Add config for guybrush BRANCH=none TEST=None.
@@ -384,6 +384,22 @@ config_zork() { readonly GPIO_PWREN=-1 } +config_guybrush() { + check_gpio_chip_exists "gpiochip320" + + readonly TRANSPORT="UART" + + readonly DEVICE="/dev/ttyS1" + + # FPMCU RST_ODL is on AGPIO 11 = 320 + 11 = 331 + readonly GPIO_NRST=331 + # FPMCU BOOT0 is on AGPIO 144 = 320 + 144 = 464 + readonly GPIO_BOOT0=464 + # FPMCU PWR_EN is on AGPIO 32 = 320 + 32 = 352, but should not be + # necessary for flashing. Set invalid value. + readonly GPIO_PWREN=-1 +} + # The "platform name" corresponds to the underlying board (reference design) # that we're running on (not the FPMCU or sensor). At the moment all of the # reference designs use the same GPIOs. If for some reason a design differs in
BugID:23251508: Fix newlibc does not define HAVE_FCNTL
@@ -729,6 +729,8 @@ static inline int eventfd(unsigned int initval, int flags) #define select(maxfdp1,readset,writeset,exceptset,timeout) lwip_select(maxfdp1,readset,writeset,exceptset,timeout) /** @ingroup socket */ #define ioctlsocket(s,cmd,argp) lwip_ioctl(s,cmd,argp) +/* This is a fix for newlibc does not define HAVE_FCNTL */ +#define fcntl(s,cmd,val) _fcntl_r(0,s,cmd,val) #else /** @ingroup socket */
Add support for expandNotificationsPanel() variant Some custom vendor ROM added an int as a parameter. Fixes <https://github.com/Genymobile/scrcpy/issues/2551>
@@ -11,6 +11,7 @@ public class StatusBarManager { private final IInterface manager; private Method expandNotificationsPanelMethod; + private boolean expandNotificationPanelMethodCustomVersion; private Method expandSettingsPanelMethod; private boolean expandSettingsPanelMethodNewVersion = true; private Method collapsePanelsMethod; @@ -21,7 +22,13 @@ public class StatusBarManager { private Method getExpandNotificationsPanelMethod() throws NoSuchMethodException { if (expandNotificationsPanelMethod == null) { + try { expandNotificationsPanelMethod = manager.getClass().getMethod("expandNotificationsPanel"); + } catch (NoSuchMethodException e) { + // Custom version for custom vendor ROM: <https://github.com/Genymobile/scrcpy/issues/2551> + expandNotificationsPanelMethod = manager.getClass().getMethod("expandNotificationsPanel", int.class); + expandNotificationPanelMethodCustomVersion = true; + } } return expandNotificationsPanelMethod; } @@ -50,7 +57,11 @@ public class StatusBarManager { public void expandNotificationsPanel() { try { Method method = getExpandNotificationsPanelMethod(); + if (expandNotificationPanelMethodCustomVersion) { + method.invoke(manager, 0); + } else { method.invoke(manager); + } } catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) { Ln.e("Could not invoke method", e); }
NN: apply q7 fix from upstream.
* Title: arm_softmax_q7.c * Description: Q7 softmax function * - * $Date: 17. January 2018 + * $Date: 20. February 2018 * $Revision: V.1.0.0 * * Target Processor: Cortex-M cores @@ -64,43 +64,56 @@ void arm_softmax_q7(const q7_t * vec_in, const uint16_t dim_vec, q7_t * p_out) { q31_t sum; int16_t i; - q15_t min, max; - max = -257; - min = 257; + uint8_t shift; + q15_t base; + base = -257; + + /* We first search for the maximum */ for (i = 0; i < dim_vec; i++) { - if (vec_in[i] > max) - { - max = vec_in[i]; - } - if (vec_in[i] < min) + if (vec_in[i] > base) { - min = vec_in[i]; + base = vec_in[i]; } } - /* we ignore really small values - * anyway, they will be 0 after shrinking - * to q7_t + /* + * So the base is set to max-8, meaning + * that we ignore really small values. + * anyway, they will be 0 after shrinking to q7_t. */ - if (max - min > 8) - { - min = max - 8; - } + base = base - 8; sum = 0; for (i = 0; i < dim_vec; i++) { - sum += 0x1 << (vec_in[i] - min); + if (vec_in[i] > base) + { + shift = (uint8_t)__USAT(vec_in[i] - base, 5); + sum += 0x1 << shift; } + } + + /* This is effectively (0x1 << 20) / sum */ + int output_base = 0x100000 / sum; + /* + * Final confidence will be output_base >> ( 13 - (vec_in[i] - base) ) + * so 128 (0x1<<7) -> 100% confidence when sum = 0x1 << 8, output_base = 0x1 << 12 + * and vec_in[i]-base = 8 + */ for (i = 0; i < dim_vec; i++) { - /* we leave 7-bit dynamic range, so that 128 -> 100% confidence */ - p_out[i] = (q7_t) __SSAT(((0x1 << (vec_in[i] - min + 20)) / sum) >> 13, 8); + if (vec_in[i] > base) + { + /* Here minimum value of 13+base-vec_in[i] will be 5 */ + shift = (uint8_t)__USAT(13+base-vec_in[i], 5); + p_out[i] = (q7_t) __SSAT((output_base >> shift), 8); + } else { + p_out[i] = 0; + } } - } /**
STM32F042K6 Board reported to work, by
@@ -47,6 +47,7 @@ STLink v2-1 (as found on the Nucleo boards), known working targets: * Nucleo-L152RE board * [Nucleo-L476RG board](http://www.st.com/en/evaluation-tools/nucleo-l476rg.html) * STM32L452RET6 (STM32 Nucleo-L452RE board) +* STM32F042K6 (STM32 Nucleo-32 Board) Please report any and all known working combinations so I can update this!
fixed stereo volume regs
@@ -1255,8 +1255,8 @@ static void sfx(tic_mem* memory, s32 index, s32 note, s32 pitch, tic_channel_dat const tic_waveform* waveform = &machine->sound.sfx->waveforms.items[wave]; memcpy(reg->waveform.data, waveform->data, sizeof(tic_waveform)); - tic_tool_poke4(&memory->ram.stereo.data, channelIndex*2, channel->volume.left * !effect->stereo_left); - tic_tool_poke4(&memory->ram.stereo.data, channelIndex*2+1, channel->volume.right * !effect->stereo_right); + tic_tool_poke4(&memory->ram.stereo.data, channelIndex*2, MAX_VOLUME - channel->volume.left * !effect->stereo_left); + tic_tool_poke4(&memory->ram.stereo.data, channelIndex*2+1, MAX_VOLUME - channel->volume.right * !effect->stereo_right); } } @@ -1541,7 +1541,7 @@ static void stereo_tick_end(tic_mem* memory, tic_sound_register_data* registers, enum {EndTime = CLOCKRATE / TIC80_FRAMERATE}; for (s32 i = 0; i < TIC_SOUND_CHANNELS; ++i ) { - u8 volume = tic_tool_peek4(&memory->ram.stereo.data, stereoRight + i*2); + u8 volume = MAX_VOLUME - tic_tool_peek4(&memory->ram.stereo.data, stereoRight + i*2); tic_sound_register* reg = &memory->ram.registers[i]; tic_sound_register_data* data = registers + i;
travis: fix CMake using only macOS internal SDK bug
@@ -250,7 +250,7 @@ before_script: - | cd $TRAVIS_BUILD_DIR if [ "$TRAVIS_OS_NAME" = 'linux' ]; then - CMAKE_OPT+=(-DCMAKE_INSTALL_PREFIX="$PWD/install") + CMAKE_OPT+=(-DCMAKE_INSTALL_PREFIX="$PWD/install" -DCMAKE_OSX_SYSROOT="" -DCMAKE_OSX_DEPLOYMENT_TARGET="") export PATH=$PATH:"$PWD/install/bin" export LD_LIBRARY_PATH="$PWD/install/lib" fi
Report resource usage at the end of recovery Reporting this has been rather useful in some recent recovery speedup work. It also seems like something that will be useful to the average DBA too. Author: David Rowley Discussion:
#include "utils/memutils.h" #include "utils/ps_status.h" #include "utils/relmapper.h" +#include "utils/pg_rusage.h" #include "utils/snapmgr.h" #include "utils/timestamp.h" @@ -7169,6 +7170,9 @@ StartupXLOG(void) { ErrorContextCallback errcallback; TimestampTz xtime; + PGRUsage ru0; + + pg_rusage_init(&ru0); InRedo = true; @@ -7435,8 +7439,9 @@ StartupXLOG(void) } ereport(LOG, - (errmsg("redo done at %X/%X", - (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr))); + (errmsg("redo done at %X/%X system usage: %s", + (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr, + pg_rusage_show(&ru0)))); xtime = GetLatestXTime(); if (xtime) ereport(LOG,
chat: prevent overlay panel from expanding
@@ -46,7 +46,7 @@ export class ProfileOverlay extends Component { if (!(top || bottom)) { bottom = `-${Math.round(OVERLAY_HEIGHT / 2)}px`; } - const containerStyle = { top, bottom, left: '100%' }; + const containerStyle = { top, bottom, left: '100%', maxWidth: '160px' }; const isOwn = window.ship === ship; @@ -79,7 +79,7 @@ export class ProfileOverlay extends Component { </div> <div className="pv3 pl3 pr2"> {contact && contact.nickname && ( - <div className="b white-d">{contact.nickname}</div> + <div className="b white-d truncate">{contact.nickname}</div> )} <div className="mono gray2">{cite(`~${ship}`)}</div> {!isOwn && (
Fix comment in heap.c The description of InsertPgAttributeTuple() does not match its handling of pg_attribute contents with NULL values for a long time, with making things more inconsistent. This adjusts the description to match the reality. Author: Daniel Gustafsson Discussion:
@@ -714,8 +714,8 @@ CheckAttributeType(const char *attname, * Construct and insert a new tuple in pg_attribute. * * Caller has already opened and locked pg_attribute. new_attribute is the - * attribute to insert. attcacheoff is always initialized to -1, attacl and - * attoptions are always initialized to NULL. + * attribute to insert. attcacheoff is always initialized to -1, attacl, + * attfdwoptions and attmissingval are always initialized to NULL. * * indstate is the index state for CatalogTupleInsertWithInfo. It can be * passed as NULL, in which case we'll fetch the necessary info. (Don't do
nimble/ll: Fix own_addr_type when scanning Make sure scansm->own_addr_type is set corretly when scanning is enabling This fixes LL/DDI/SCN/BV-16
@@ -2923,6 +2923,10 @@ ble_ll_scan_set_enable(uint8_t *cmd, uint8_t ext) if (scansm->cur_phy == PHY_NOT_CONFIGURED) { scansm->cur_phy = i; + /* Take own_addr_type from the first configured PHY. + * Note: All configured PHYs shall have the same own_addr_type + */ + scansm->own_addr_type = scanphy->own_addr_type; } else { scansm->next_phy = i; }
lets fit it in one 4k page
@@ -183,7 +183,7 @@ extern "C" { #define ALLOCA_ALIGN 63UL -#define NUM_BUFFERS MAX(64,(MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER)) +#define NUM_BUFFERS MAX(50,(MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER)) #ifdef NEEDBUNDERSCORE #define BLASFUNC(FUNC) FUNC##_
Fix alphabetization;
@@ -18,12 +18,12 @@ int l_lovrTimerInit(lua_State* L); extern const luaL_Reg lovrAnimator[]; extern const luaL_Reg lovrAudio[]; extern const luaL_Reg lovrBallJoint[]; +extern const luaL_Reg lovrBlob[]; extern const luaL_Reg lovrBoxShape[]; extern const luaL_Reg lovrCanvas[]; extern const luaL_Reg lovrCapsuleShape[]; extern const luaL_Reg lovrController[]; extern const luaL_Reg lovrCylinderShape[]; -extern const luaL_Reg lovrBlob[]; extern const luaL_Reg lovrCollider[]; extern const luaL_Reg lovrDistanceJoint[]; extern const luaL_Reg lovrEvent[];
remove duplicate/broken link
@@ -35,7 +35,6 @@ install the OpenSSL command line utility prior to using the script. ``` - To use the samples, we use [Eclipse Paho MQTT C client][Eclipse_Paho]. You can use the directions [here][VCPKG_DIRECTIONS] to set up VCPKG to download and manage linking the dependency. -- If you are having trouble with any of the prerequisites, please see our `how_to_iot_hub_samples_<platform>.md` documents [here](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/iot/) for more help. ## Getting Started
clay: refactors +cancel-request, consistently accounting for TMI
:: we remove it from `ref` and tell the foreign ship to cancel as well. :: ++ cancel-request :: release request - ^+ . + ^+ ..cancel-request =^ wos/(list wove) qyx :_ (~(run by qyx) |=(a/(set duct) (~(del in a) hen))) %- ~(rep by qyx) |= {{a/wove b/(set duct)} c/(list wove)} ?.((~(has in b) hen) c [a c]) + :: ?~ ref => .(ref `(unit rind)`ref) :: XX TMI - ?: =(~ wos) + :: XX handle? - |- ^+ +> - ?~ wos +> - $(wos t.wos, +> (run-if-future rove.i.wos |=(@da (best hen +<)))) - ^+ ..cancel-request - =+ nux=(~(get by fod.u.ref) hen) - ?~ nux ..cancel-request + ?: =(~ wos) ..cancel-request :: XX handle? + |- ^+ ..cancel-request + ?~ wos ..cancel-request + =. ..cancel-request (run-if-future rove.i.wos |=(@da (best hen +<))) + $(wos t.wos) + :: + ?~ nux=(~(get by fod.u.ref) hen) + ..cancel-request(ref `(unit rind)`ref) :: XX TMI =: fod.u.ref (~(del by fod.u.ref) hen) bom.u.ref (~(del by bom.u.ref) u.nux) == - (send-over-ames hen her u.nux syd ~) + %. [hen her u.nux [syd ~]] + send-over-ames(ref `(unit rind)`ref) :: XX TMI :: :: Handles a request. ::
let NET_CAN_RAW_FILTER_MAX depends on NET_CANPROTO_OPTIONS to prevent compiler errors
@@ -94,7 +94,7 @@ config NET_CAN_RAW_DEFAULT_TX_DEADLINE config NET_CAN_RAW_FILTER_MAX int "CAN_RAW_FILTER max filter count" default 32 - depends on NET_CAN_SOCK_OPTS + depends on NET_CANPROTO_OPTIONS ---help--- Maximum number of CAN_RAW filters that can be set per CAN connection.
meson: build with -Wno-unused-parameter Otherwise we get a ton of warnings about unused function parameters. The existing -Qunused-arguments seems to be clang specific.
@@ -123,8 +123,8 @@ c_args = [] foreach a : ['-Werror=implicit-function-declaration', '-Werror=missing-prototypes', '-Werror=return-type', '-Werror=incompatible-pointer-types', - '-fno-math-errno', - '-fno-trapping-math', '-Qunused-arguments'] + '-Wno-unused-parameter', '-Qunused-arguments', + '-fno-math-errno', '-fno-trapping-math'] if cc.has_argument(a) c_args += a endif @@ -139,8 +139,8 @@ endforeach # Check for generic C++ arguments cpp_args = [] foreach a : ['-Werror=return-type', - '-fno-math-errno', '-fno-trapping-math', - '-Qunused-arguments'] + '-Wno-unused-parameter', '-Qunused-arguments', + '-fno-math-errno', '-fno-trapping-math'] if cpp.has_argument(a) cpp_args += a endif
Adding CFLAGS to link commands to pass flags required by AddressSanitizer.
@@ -116,7 +116,7 @@ cat << END >> $NXT_MAKEFILE $NXT_BUILD_DIR/lib_unit_test: \$(NXT_LIB_UNIT_TEST_OBJS) \\ $NXT_BUILD_DIR/$NXT_LIB_STATIC \$(NXT_LIB_DEPS) \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/lib_unit_test \\ - \$(NXT_LIB_UNIT_TEST_OBJS) \\ + \$(CFLAGS) \$(NXT_LIB_UNIT_TEST_OBJS) \\ $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS @@ -191,7 +191,7 @@ cat << END >> $NXT_MAKEFILE $NXT_BUILD_DIR/$NXT_BIN: $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ \$(NXT_OBJS) - \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/$NXT_BIN \\ + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/$NXT_BIN \$(CFLAGS) \\ \$(NXT_OBJS) $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
[chainmaker][#436]remove BoatHlchainamkerClient struct
@@ -118,13 +118,6 @@ typedef struct TBoatTransactionPara { BoatKeyValuePair parameters[BOAT_HLCHAINMAKER_ARGS_MAX_NUM]; } BoatTransactionPara; - -typedef struct TBoatHlchainamkerClient { - - BCHAR* chain_id; - BCHAR* org_id; -} BoatHlchainamkerClient; - typedef struct TBoatHlchainamkerResult { BUINT32 code; char* message; @@ -166,7 +159,6 @@ typedef struct TBoatHlchainamkerTx { BoatHlchainmakerWallet* wallet_ptr; //!< Pointer of the transaction wallet BoatTransactionPara trans_para; - BoatHlchainamkerClient client_para; }BoatHlchainmakerTx;
use stack allocated memory to prevent accidental memory leaks
@@ -176,7 +176,7 @@ static void tls_server_handler( int rc, int sock ) { } // Get the CN field of an certificate -static char *get_common_name( const mbedtls_x509_crt *crt ) { +static int get_common_name( char buf[], size_t len, const mbedtls_x509_crt *crt ) { const mbedtls_x509_name *name; const char *short_name; int ret; @@ -185,15 +185,17 @@ static char *get_common_name( const mbedtls_x509_crt *crt ) { while( name ) { if( name->oid.p ) { ret = mbedtls_oid_get_attr_short_name( &name->oid, &short_name ); - if( ret == 0 && strcmp( short_name, "CN" ) == 0 ) { - return strndup( (char*)name->val.p, name->val.len ); + if( ret == 0 && strcmp( short_name, "CN" ) == 0 && name->val.len < len ) { + memcpy( buf, (char*)name->val.p, name->val.len ); + buf[name->val.len] = '\0'; + return 0; } } name = name->next; } - return NULL; + return 1; } // SNI callback. The client submits the domain it is looking for. @@ -227,7 +229,7 @@ int tls_server_add_sni( const char crt_file[], const char key_file[] ) { mbedtls_pk_context key; struct sni_entry *new; struct sni_entry *cur; - char *name; + char name[QUERY_MAX_SIZE]; int ret; mbedtls_x509_crt_init( &crt ); @@ -246,8 +248,8 @@ int tls_server_add_sni( const char crt_file[], const char key_file[] ) { } // Check if common name is set - if( (name = get_common_name( &crt )) == NULL ) { - log_err( "TLS: No common name set in %s", crt_file ); + if( get_common_name( name, sizeof(name), &crt ) != 0) { + log_err( "TLS-Server: No common name set in %s", crt_file ); return 1; } @@ -267,7 +269,7 @@ int tls_server_add_sni( const char crt_file[], const char key_file[] ) { return 1; } - new->name = name; + new->name = strdup( name ); memcpy( &new->key, &key, sizeof(key) ); memcpy( &new->crt, &crt, sizeof(crt) );
Remove Hardcoded interface numbers from video descriptors Removing the Hardcoded interface numbers from the video descriptors allow the user to add other interfaces before or after the Video Control Interface and Video Streaming Interface
#define FRAME_RATE 10 enum { - ITF_NUM_VIDEO_CONTROL = 0, + ITF_NUM_VIDEO_CONTROL, ITF_NUM_VIDEO_STREAMING, ITF_NUM_TOTAL }; @@ -74,19 +74,19 @@ enum { TUD_VIDEO_DESC_CS_VS_FMT_UNCOMPR(_fmtidx, _numfmtdesc, TUD_VIDEO_GUID_I420, 12, _frmidx, _asrx, _asry, _interlace, _cp) #define TUD_VIDEO_CAPTURE_DESCRIPTOR(_stridx, _epin, _width, _height, _fps, _epsize) \ - TUD_VIDEO_DESC_IAD(ITF_NUM_VIDEO_CONTROL, ITF_NUM_TOTAL, _stridx), \ + TUD_VIDEO_DESC_IAD(ITF_NUM_VIDEO_CONTROL, /* 2 Interfaces */ 0x02, _stridx), \ /* Video control 0 */ \ TUD_VIDEO_DESC_STD_VC(ITF_NUM_VIDEO_CONTROL, 0, _stridx), \ TUD_VIDEO_DESC_CS_VC( /* UVC 1.5*/ 0x0150, \ /* wTotalLength - bLength */ \ TUD_VIDEO_DESC_CAMERA_TERM_LEN + TUD_VIDEO_DESC_OUTPUT_TERM_LEN, \ - UVC_CLOCK_FREQUENCY, 1), \ + UVC_CLOCK_FREQUENCY, ITF_NUM_VIDEO_STREAMING), \ TUD_VIDEO_DESC_CAMERA_TERM(UVC_ENTITY_CAP_INPUT_TERMINAL, 0, 0,\ /*wObjectiveFocalLengthMin*/0, /*wObjectiveFocalLengthMax*/0,\ /*wObjectiveFocalLength*/0, /*bmControls*/0), \ TUD_VIDEO_DESC_OUTPUT_TERM(UVC_ENTITY_CAP_OUTPUT_TERMINAL, VIDEO_TT_STREAMING, 0, 1, 0), \ /* Video stream alt. 0 */ \ - TUD_VIDEO_DESC_STD_VS( 1, 0, 0, 0), \ + TUD_VIDEO_DESC_STD_VS(ITF_NUM_VIDEO_STREAMING, 0, 0, _stridx), \ /* Video stream header for without still image capture */ \ TUD_VIDEO_DESC_CS_VS_INPUT( /*bNumFormats*/1, \ /*wTotalLength - bLength */\ @@ -106,7 +106,7 @@ enum { (10000000/_fps), (10000000/_fps), (10000000/_fps)*_fps, (10000000/_fps)), \ TUD_VIDEO_DESC_CS_VS_COLOR_MATCHING(VIDEO_COLOR_PRIMARIES_BT709, VIDEO_COLOR_XFER_CH_BT709, VIDEO_COLOR_COEF_SMPTE170M), \ /* VS alt 1 */\ - TUD_VIDEO_DESC_STD_VS(1, 1, 1, 0), \ + TUD_VIDEO_DESC_STD_VS(ITF_NUM_VIDEO_STREAMING, 1, 1, _stridx), \ /* EP */ \ TUD_VIDEO_DESC_EP_ISO(_epin, _epsize, 1)
ruby: remove module name from ELEKTRA_PLUGIN_FUNCTION See for details.
#define RUBY_PLUGIN_NAME ruby #define RUBY_PLUGIN_NAME_STR "ruby" -#define RUBY_PLUGIN_FUNCTION(func) ELEKTRA_PLUGIN_FUNCTION (Ruby, func) +#define RUBY_PLUGIN_FUNCTION(func) ELEKTRA_PLUGIN_FUNCTION (func) extern "C" { #include <kdbplugin.h>
Update README with correct -ldflags value when building on Windows without Command Prompt window
@@ -135,7 +135,7 @@ You can also cross-compile to another OS. For example, to Windows: `CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w"` -On Windows, if you would like to hide the Command Prompt window when running the statically-compiled program, you could append `-h WINDOWSGUI` to the `-ldflags` value. +On Windows, if you would like to hide the Command Prompt window when running the statically-compiled program, you could append `-H windowsgui` to the `-ldflags` value. For the list of OS and architecture, you can see inside the [.go-sdl2-libs](https://github.com/veandco/go-sdl2/tree/master/.go-sdl2-libs) directory.
lindar: define GPIO CCD_MODE_ODL Define PIN(E,5) CCD_MODE_ODL to input. BRANCH=firmware-volteer-13672.B TEST=make buildall -j
@@ -95,6 +95,7 @@ UNIMPLEMENTED(USB_C1_LS_EN) /* Misc Signals */ GPIO(EC_H1_PACKET_MODE, PIN(7, 5), GPIO_OUT_LOW) /* H1 Packet Mode */ +GPIO(CCD_MODE_ODL, PIN(E, 5), GPIO_INPUT) /* Case Closed Debug Mode */ /* * Determine the polarity of these SSD signals and whether
distro-packages/python-rpm-macros: testing
local spec_name_prefix = "python" -- modname from name local name = modname -@@ -53,18 +53,18 @@ - end - - -- find the spec file -- specpath = rpm.expand("%_specfile") -+-- specpath = rpm.expand("%_specfile") - - -- search possible locations - shouldn't be necessary anymore ---- local locations = { rpm.expand("%_sourcedir"), rpm.expand("%_specdir"), posix.getcwd(), posix.getcwd() .. "/" .. name } ---- for _,loc in ipairs(locations) do ---- local filename = loc .. "/" .. name .. ".spec" ---- if posix.stat(filename, "mode") ~= nil then ---- io.stderr:write("could not find spec as " .. filename .. "\n") ---- specpath = filename ---- break ---- end ---- end -+ local locations = { rpm.expand("%_specdir"), rpm.expand("%_sourcedir"), posix.getcwd(), posix.getcwd() .. "/" .. name } -+ for _,loc in ipairs(locations) do -+ local filename = loc .. "/" .. name .. ".spec" -+ if posix.stat(filename, "mode") ~= nil then -+ io.stderr:write("could not find spec as " .. filename .. "\n") -+ specpath = filename -+ break -+ end -+ end - end - - function python_subpackages()
bumping go
@@ -3,7 +3,7 @@ jobs: build-pc: docker: # specify the version - - image: cimg/go:1.16 + - image: cimg/go:1.20.0 steps: - checkout - run: sudo apt-get update @@ -43,7 +43,7 @@ jobs: build-pc-debug: docker: # specify the version - - image: cimg/go:1.16 + - image: cimg/go:1.20.0 steps: - checkout - run: sudo apt-get update @@ -59,7 +59,7 @@ jobs: nightly-build: docker: - - image: cimg/go:1.16 + - image: cimg/go:1.20.0 steps: - checkout - run: sudo apt-get update @@ -150,7 +150,7 @@ jobs: build-virt: docker: - - image: cimg/go:1.16 + - image: cimg/go:1.20.0 steps: - checkout - run: sudo apt-get update @@ -166,7 +166,7 @@ jobs: nightly-build-virt: docker: - - image: cimg/go:1.16 + - image: cimg/go:1.20.0 steps: - checkout - run: sudo apt-get update @@ -202,7 +202,7 @@ jobs: build-riscv: docker: - - image: cimg/go:1.17.5 + - image: cimg/go:1.20.0 steps: - checkout - run: sudo apt-get update
add interrupt check back in to factorization
#include "qdldl.h" +#include "ctrlc.h" #define QDLDL_UNKNOWN (-1) #define QDLDL_USED (1) @@ -138,6 +139,10 @@ QDLDL_int QDLDL_factor(const QDLDL_int n, //Start from 1 here. The upper LH corner is trivially 0 //in L b/c we are only computing the subdiagonal elements for(k = 1; k < n; k++){ + if(scs_is_interrupted()) { + scs_printf("interrupt detected in factorization\n"); + return -1; + } //NB : For each k, we compute a solution to //y = L(0:(k-1),0:k-1))\b, where b is the kth
Fix int32 overflow bugs with deep images A 32k x 32k image * 8 byte pointers leads to an overflow when trying to find the sample count of a deep pixel.
@@ -99,7 +99,7 @@ inline int& sampleCount(char* base, int xStride, int yStride, int x, int y) { - char* ptr = base + y * yStride + x * xStride; + char* ptr = base + y * ptrdiff_t(yStride) + x * ptrdiff_t(xStride); int* intPtr = (int*) ptr; return *intPtr; @@ -110,7 +110,7 @@ inline const int& sampleCount(const char* base, int xStride, int yStride, int x, int y) { - const char* ptr = base + y * yStride + x * xStride; + const char* ptr = base + y * ptrdiff_t(yStride) + x * ptrdiff_t(xStride); int* intPtr = (int*) ptr; return *intPtr;