message
stringlengths
6
474
diff
stringlengths
8
5.22k
Fix sprite pool reset on scene change
@@ -8,6 +8,7 @@ UBYTE sprite_active_pool_size = 0; void SpritePoolReset_b() { UBYTE i, k; + sprite_pool[0] = 0; for (i = 0; i != MAX_SPRITES; i++) { // Reverse order of sprites so newer // sprites will appear behind player/projectiles
dm: monotor: bugfix: update wakeup reason before call recume() callback In handle_resume(), wakeup_reason is updated before call ops->ops->resume(). Because ops->ops->resume() needs to know the latest wakeup reason. Acked-by: Yan Like
@@ -168,6 +168,8 @@ static void handle_resume(struct mngr_msg *msg, int client_fd, void *param) ack.msgid = msg->msgid; ack.timestamp = msg->timestamp; + wakeup_reason = msg->data.reason; + LIST_FOREACH(ops, &vm_ops_head, list) { if (ops->ops->resume) { ret += ops->ops->resume(ops->arg); @@ -181,8 +183,6 @@ static void handle_resume(struct mngr_msg *msg, int client_fd, void *param) } else ack.data.err = ret; - wakeup_reason = msg->data.reason; - mngr_send_msg(client_fd, &ack, NULL, ACK_TIMEOUT); }
[runtime] Add busywait function
+// Copyright 2020 ETH Zurich and University of Bologna. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Author: Samuel Riedel, ETH Zurich +// Matheus Cavalcante, ETH Zurich + #pragma once #include "encoding.h" -#include <stdint.h> #include <stddef.h> +#include <stdint.h> extern char l1_alloc_base; extern uint32_t atomic_barrier; @@ -24,35 +43,14 @@ static inline mempool_id_t mempool_get_core_id() { } /// Obtain a monotonically increasing cycle count. -static inline mempool_timer_t mempool_get_timer() { - return read_csr(mcycle); -} +static inline mempool_timer_t mempool_get_timer() { return read_csr(mcycle); } -/// A cluster-local barrier. -static inline void mempool_barrier() { - // // The following is a software-only barrier using AMOs. - // uint32_t core_id = mempool_get_core_id(); - // uint32_t core_count = mempool_get_core_count(); - // uint32_t mask = 1 << core_id; - // uint32_t others = ((1 << core_count) - 1) ^ mask; - // if (core_id == 0) { - // while ((__atomic_load_n(&atomic_barrier, __ATOMIC_RELAXED) & others) != others); - // __atomic_or_fetch(&atomic_barrier, mask, __ATOMIC_RELAXED); - // while ((__atomic_load_n(&atomic_barrier, __ATOMIC_RELAXED) & others) != 0); - // __atomic_and_fetch(&atomic_barrier, ~mask, __ATOMIC_RELAXED); - // } else { - // while ((__atomic_load_n(&atomic_barrier, __ATOMIC_RELAXED) & 1) != 0); - // __atomic_or_fetch(&atomic_barrier, mask, __ATOMIC_RELAXED); - // while ((__atomic_load_n(&atomic_barrier, __ATOMIC_RELAXED) & 1) != 1); - // __atomic_and_fetch(&atomic_barrier, ~mask, __ATOMIC_RELAXED); - // } - - // The following uses the hardware barrier. - extern uint32_t barrier_reg; - uint32_t tmp; - asm volatile ( - "lw %[tmp], 0(%[addr]) \n" - "mv zero, %[tmp] \n" - : [tmp]"=r"(tmp) : [addr]"r"(&barrier_reg) - ); +/// Busy loop for waiting +static inline void mempool_wait(uint32_t cycles) { + asm volatile("1: \n\t" + "addi %[counter], %[counter], -2 \n\t" + "bgtz %[counter], 1b \n\t" + : [counter] "+&r"(cycles) + : + : "memory"); }
Added more conventional edit keys.
@@ -333,13 +333,19 @@ static void handle_keydown_ctrl(Edit_field *edit_field, const SDL_Event *event) kill_to_end_of_line(edit_field); } break; - case SDLK_w: { + case SDLK_w: + case SDLK_x: { field_buffer_cut(edit_field); } break; - case SDLK_y: { + case SDLK_y: + case SDLK_v: { field_buffer_paste(edit_field); } break; + + case SDLK_c: { + field_buffer_copy(edit_field); + } break; } }
detect damaged NMEA sentences
@@ -2708,6 +2708,7 @@ return true; /*===========================================================================*/ static inline void processpackets() { +static int gpscount; static uint16_t maincount; static uint64_t incommingcountold; static int sa; @@ -2721,6 +2722,7 @@ static const char gprmc[] = "$GPRMC"; nmeaptr = nogps; if(fd_gps > 0) { + gpscount = 0; printf("waiting up to 2 minutes seconds to get GPS fix\n"); tvfd.tv_sec = 120; tvfd.tv_usec = 0; @@ -2736,6 +2738,12 @@ if(fd_gps > 0) fdnum = select(fd_gps +1, &readfds, NULL, NULL, &tvfd); if(FD_ISSET(fd_gps, &readfds)) { + if(gpscount > 120) + { + printf("GPS failed\n"); + break; + } + gpscount++; nmeatemplen = read(fd_gps, nmeatempsentence, NMEA_MAX); if(nmeatemplen < 38) continue; if(nmeatempsentence[17] == 'V') continue;
Unlock request after invalidating cache lines
@@ -394,15 +394,15 @@ static void ocf_engine_remap(struct ocf_request *req) /* mark error */ ocf_req_set_mapping_error(req); - /* unlock cachelines locked during remapping */ - ocf_req_unlock(ocf_cache_line_concurrency(req->cache), - req); - /* request cleaning */ ocf_req_set_cleaning_required(req); /* unmap inserted and replaced cachelines */ ocf_engine_map_hndl_error(req->cache, req); + + /* unlock cachelines locked during remapping */ + ocf_req_unlock(ocf_cache_line_concurrency(req->cache), + req); } return;
fix completions of config
@@ -54,8 +54,25 @@ task("config") , {category = "."} , {'p', "plat", "kv", "$(host)" , "Compile for the given platform." - , values = function () - return import("core.platform.platform").plats() + , values = function (complete, opt) + + -- import + import("core.platform.platform") + import("core.base.hashset") + + if not complete or not opt.arch then + return platform.plats() + end + + -- arch has given, find all supported platforms + local plats = {} + for _, plat in ipairs(platform.plats()) do + local archs = hashset.from(platform.archs(plat)) + if archs:has(opt.arch) then + table.insert(plats, plat) + end + end + return plats end } , {'a', "arch", "kv", "auto" , "Compile for the given architecture.", -- show the description of all architectures @@ -86,36 +103,27 @@ task("config") import("core.platform.platform") import("core.base.hashset") - -- make description - local arches = hashset.new() + -- get archs + local archset = hashset.new() - if opt.plat then - local archs = platform.archs(opt.plat) - if archs then - for _, arch in ipairs(archs) do - arches:insert(arch) - end - end - else - for _, plat in ipairs(platform.plats()) do + for _, plat in ipairs(opt.plat and { opt.plat } or platform.plats()) do local archs = platform.archs(plat) if archs then for _, arch in ipairs(archs) do - arches:insert(arch) - end + archset:insert(arch) end end end -- get it - return arches:to_array() + return archset:to_array() end } , {'m', "mode", "kv", "release" , "Compile for the given mode." , values = function (complete) - local modes = try { - function() return import("core.project.project").modes() end - } or {"debug", "release"} + local modes = (try { function() + return import("core.project.project").modes() + end }) or {"debug", "release"} table.sort(modes) if not complete then table.insert(modes, "... (custom)") @@ -177,7 +185,11 @@ task("config") , {} , {nil, "target", "v" , nil , "Configure for the given target." - , values = function () return try{ function () return table.keys(import("core.project.project").targets()) end } end } + , values = function () + return try { function () + return table.keys(import("core.project.project").targets()) + end } + end } } }
Fix xmas iterator For some reason the Qt iterators don't behave.
@@ -307,7 +307,8 @@ int DeRestPluginPrivate::setXmasLightStripState(const ApiRequest &req, ApiRespon QList<QList<quint8>> effectColours; // Check parameters. - for (auto p = map.constBegin(); p != map.constEnd(); p++) + const auto mapEnd = map.cend(); + for (auto p = map.cbegin(); p != mapEnd; ++p) { bool paramOk = false; bool valueOk = false;
Sprinkle in some static to prevent missing prototype warnings.
@@ -2248,7 +2248,7 @@ http_chunked_segment(struct comm_point* c) #ifdef HAVE_NGHTTP2 /** Create new http2 session. Called when creating handling comm point. */ -struct http2_session* http2_session_create(struct comm_point* c) +static struct http2_session* http2_session_create(struct comm_point* c) { struct http2_session* session = calloc(1, sizeof(*session)); if(!session) { @@ -2262,7 +2262,7 @@ struct http2_session* http2_session_create(struct comm_point* c) #endif /** Delete http2 session. After closing connection or on error */ -void http2_session_delete(struct http2_session* h2_session) +static void http2_session_delete(struct http2_session* h2_session) { #ifdef HAVE_NGHTTP2 if(h2_session->callbacks) @@ -2338,7 +2338,7 @@ void http2_session_add_stream(struct http2_session* h2_session, /** remove stream from session linked list. After stream close callback or * closing connection */ -void http2_session_remove_stream(struct http2_session* h2_session, +static void http2_session_remove_stream(struct http2_session* h2_session, struct http2_stream* h2_stream) { if(h2_stream->prev)
Replace one-sized arrays with one member (flexible array hack) to avoid UB. Reference:
@@ -594,7 +594,7 @@ DppDbGetPropertyBuffer ( Status = EFI_SUCCESS; if (!Result) { - BufferNode = &Buffer->Nodes[0]; + BufferNode = &(&Buffer->Nodes)[0]; do { BufferSize = GetDevicePathSize (&NodeWalker->DevicePath); @@ -765,7 +765,7 @@ InternalReadEfiVariableProperties ( Status = EFI_NOT_FOUND; } else if (EFI_ERROR (Status)) { if ((Buffer->Hdr.MustBe1 == 1) && (Buffer->Hdr.NumberOfNodes > 0)) { - BufferNode = &Buffer->Nodes[0]; + BufferNode = &(&Buffer->Nodes)[0]; NumberOfNodes = 0; do {
Delay HE candidates based on priority when property "__he_delay" is specified
@@ -113,7 +113,7 @@ delayed_he_connect_req(struct neat_he_candidate *candidate, uv_poll_cb callback_ if (he_delay_property != NULL){ he_delay_val = json_object_get(he_delay_property, "value"); assert(he_delay_val); - he_delay += json_integer_value(he_delay_val); + he_delay = json_integer_value(he_delay_val) * candidate->priority; nt_log(candidate->ctx, NEAT_LOG_INFO, "%s - delaying candidate by %d ms", __func__, he_delay); }
github: DoD now called checklist
@@ -31,8 +31,7 @@ We recommend that you read: Before you issue a pull request that modifies code: - You should read the [coding document](/doc/CODING.md). -- You should read the [design document](/doc/DESIGN.md). -- Make sure you fulfilled the [definition of done](/.github/PULL_REQUEST_TEMPLATE.md). +- Make sure you fulfilled the [checklist](/.github/PULL_REQUEST_TEMPLATE.md). # Architecture @@ -41,6 +40,7 @@ Before you start making fundamental changes: - Propose it by creating a [github issue](https://github.com/ElektraInitiative/libelektra/issues/new) for discussions. +- You should read the [design document](/doc/DESIGN.md). - Create a [decision](/doc/decisions/README.md) describing you want to do to keep the discussion more efficient and architecture documented.
for Redhat build, source the devtoolset-7 enablement script to avoid need to customize one's environment to build aomp
@@ -28,6 +28,7 @@ thisdir=$(getdname $0) # --- end standard header ---- function build_aomp_component() { + [ -f /opt/rh/devtoolset-7/enable ] && . /opt/rh/devtoolset-7/enable $AOMP_REPOS/$AOMP_REPO_NAME/bin/build_$COMPONENT.sh "$@" rc=$? if [ $rc != 0 ] ; then
Clarification of the Notice to external contributors I hereby agree to the terms of the CLA available at:
@@ -19,7 +19,7 @@ If you agree with these principles, please read and adopt our CLA. By providing ## Provide contributions -If you have already adopted terms and conditions of the CLA, you are able to provide your contributions. When you submit your pull request, please add the following information into it: +If you have already adopted terms and conditions of the CLA, you are able to provide your contributions. When you submit your first pull request, please add the following information into it: ``` I hereby agree to the terms of the CLA available at: [link]. @@ -28,4 +28,4 @@ I hereby agree to the terms of the CLA available at: [link]. Replace the bracketed text as follows: * [link] is the link to the current version of the CLA: https://yandex.ru/legal/cla/?lang=en (in English) or https://yandex.ru/legal/cla/?lang=ru (in Russian). -It is enough to provide such notification once. +It is enough to provide this notification only once.
sm5803: add parenthesis to the input of macros Inputs have to be guarded with parenthesis. TEST=make buildall BRANCH=main
@@ -225,8 +225,8 @@ enum sm5803_charger_modes { #define SM5803_REG_CHG_ILIM 0x24 #define SM5803_CHG_ILIM_RAW GENMASK(4, 0) #define SM5803_CURRENT_STEP 100 -#define SM5803_REG_TO_CURRENT(r) (r * SM5803_CURRENT_STEP) -#define SM5803_CURRENT_TO_REG(c) (c / SM5803_CURRENT_STEP) +#define SM5803_REG_TO_CURRENT(r) ((r) * SM5803_CURRENT_STEP) +#define SM5803_CURRENT_TO_REG(c) ((c) / SM5803_CURRENT_STEP) /* * DPM Voltage loop regulation contains the 8 bits with MSB register @@ -265,8 +265,8 @@ enum sm5803_charger_modes { #define SM5803_VOLTAGE_STEP 10 #define SM5803_VOLTAGE_SHIFT 2720 #define SM5803_REG_TO_VOLTAGE(r) (SM5803_VOLTAGE_SHIFT + \ - r * SM5803_VOLTAGE_STEP) -#define SM5803_VOLTAGE_TO_REG(v) ((v - SM5803_VOLTAGE_SHIFT) \ + (r) * SM5803_VOLTAGE_STEP) +#define SM5803_VOLTAGE_TO_REG(v) (((v) - SM5803_VOLTAGE_SHIFT) \ / SM5803_VOLTAGE_STEP) /*
vat: Fix the incrementing IPv6 address Type: fix
@@ -737,9 +737,9 @@ increment_v6_address (vl_api_ip6_address_t * i) static void increment_address (vl_api_address_t * a) { - if (a->af == ADDRESS_IP4) + if (clib_net_to_host_u32 (a->af) == ADDRESS_IP4) increment_v4_address (&a->un.ip4); - else if (a->af == ADDRESS_IP6) + else if (clib_net_to_host_u32 (a->af) == ADDRESS_IP6) increment_v6_address (&a->un.ip6); }
Fix small typo in sway-input(5)
@@ -107,7 +107,7 @@ The following commands may only be used in the configuration file. Sets the pointer acceleration profile for the specified input device. *input* <identifier> calibration_matrix <6 space-separated floating point values> - Sets the calibtration matrix. + Sets the calibration matrix. *input* <identifier> click_method none|button_areas|clickfinger Changes the click method for the specified device.
Fix NaN handling when calculating angle for mat4 The arccos was incorrectly calculated when cosangle was larger than 1.0
@@ -546,7 +546,7 @@ MAF void mat4_getAngleAxis(mat4 m, float* angle, float* ax, float* ay, float* az if (fabsf(cosangle) < 1.f - FLT_EPSILON) { *angle = acosf(cosangle); } else { - *angle = (float) M_PI; + *angle = cosangle > 0.f ? 0.f : (float) M_PI; } *ax = axis[0]; *ay = axis[1];
travis: For powerpc job, build both UART variants. The powerpc port can be built with two different UART drivers, so build both in CI. The default compiler is now powerpc64le-linux-gnu- so it does not need to be specified on the command line.
@@ -416,4 +416,5 @@ jobs: - sudo apt-get install gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross script: - make ${MAKEOPTS} -C mpy-cross - - make ${MAKEOPTS} -C ports/powerpc CROSS_COMPILE=powerpc64le-linux-gnu- + - make ${MAKEOPTS} -C ports/powerpc UART=potato + - make ${MAKEOPTS} -C ports/powerpc UART=lpc_serial
imxrt: Fixed isel and pad registers address getters
@@ -316,12 +316,12 @@ static volatile u32 *_imxrt_IOpadGetReg(int pad) return NULL; if (pad >= pctl_pad_snvs_test_mode) - return imxrt_common.iomuxsnvs + 3; + return imxrt_common.iomuxsnvs + 3 + (pad - pctl_pad_snvs_test_mode); if (pad >= pctl_pad_gpio_spi_b0_00) - return imxrt_common.iomuxc + 429; + return imxrt_common.iomuxc + 429 + (pad - pctl_pad_gpio_spi_b0_00); - return imxrt_common.iomuxc + 129; + return imxrt_common.iomuxc + 129 + pad; } @@ -418,9 +418,9 @@ static volatile u32 *_imxrt_IOiselGetReg(int isel, u32 *mask) } if (isel >= pctl_isel_enet2_ipg_clk_rmii) - return imxrt_common.iomuxc + 451; + return imxrt_common.iomuxc + 451 + (isel - pctl_isel_enet2_ipg_clk_rmii); - return imxrt_common.iomuxc + 253; + return imxrt_common.iomuxc + 253 + isel; }
pyocf: Volume not to inherit from ctypes.Structure Volume object is never referenced from C code, so there is no need to inherit from ctypes.Structure.
# -# Copyright(c) 2019-2021 Intel Corporation +# Copyright(c) 2019-2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # @@ -77,9 +77,7 @@ class VolumeIoPriv(Structure): VOLUME_POISON = 0x13 -class Volume(Structure): - - _fields_ = [("_storage", c_void_p)] +class Volume(): _instances_ = weakref.WeakValueDictionary() _uuid_ = weakref.WeakValueDictionary() @@ -101,7 +99,7 @@ class Volume(Structure): self.data = create_string_buffer(int(self.size)) memset(self.data, VOLUME_POISON, self.size) - self._storage = cast(self.data, c_void_p) + self.data_ptr = cast(self.data, c_void_p).value self.reset_stats() self.opened = False @@ -262,7 +260,7 @@ class Volume(Structure): self.size = size self.data = create_string_buffer(int(self.size)) memset(self.data, VOLUME_POISON, self.size) - self._storage = cast(self.data, c_void_p) + self.data_ptr = cast(self.data, c_void_p).value def get_max_io_size(self): return S.from_KiB(128) @@ -272,7 +270,7 @@ class Volume(Structure): def submit_discard(self, discard): try: - dst = self._storage + discard.contents._addr + dst = self.data_ptr + discard.contents._addr memset(dst, 0, discard.contents._bytes) discard.contents._end(discard, 0) @@ -296,11 +294,11 @@ class Volume(Structure): if io.contents._dir == IoDir.WRITE: src_ptr = cast(OcfLib.getInstance().ocf_io_get_data(io), c_void_p) src = Data.get_instance(src_ptr.value).handle.value + offset - dst = self._storage + io.contents._addr + dst = self.data_ptr + io.contents._addr elif io.contents._dir == IoDir.READ: dst_ptr = cast(OcfLib.getInstance().ocf_io_get_data(io), c_void_p) dst = Data.get_instance(dst_ptr.value).handle.value + offset - src = self._storage + io.contents._addr + src = self.data_ptr + io.contents._addr memmove(dst, src, io.contents._bytes) io_priv.contents._offset += io.contents._bytes @@ -313,15 +311,15 @@ class Volume(Structure): if size == 0: size = int(self.size) - int(offset) - print_buffer(self._storage, size, ignore=ignore, **kwargs) + print_buffer(self.data_ptr, size, ignore=ignore, **kwargs) def md5(self): m = md5() - m.update(string_at(self._storage, self.size)) + m.update(string_at(self.data_ptr, self.size)) return m.hexdigest() def get_bytes(self): - return string_at(self._storage, self.size) + return string_at(self.data_ptr, self.size) class ErrorDevice(Volume):
Align dots after typo correction Forgot to add an additional dot in order to align the output after a letter was removed.
@@ -423,8 +423,8 @@ if(outmode == 0) { fprintf(stdout, "total hashes read from file.......: %ld\n" "\x1B[32mhandshakes from clients...........: %ld\x1B[0m\n" - "little endian router detected....: %ld\n" - "big endian router detected.......: %ld\n" + "little endian router detected.....: %ld\n" + "big endian router detected........: %ld\n" "zeroed ESSID......................: %ld\n" "802.1x Version 2001...............: %ld\n" "802.1x Version 2004...............: %ld\n"
Change specification link to the DataFormat spec
@@ -16,7 +16,7 @@ energy consumption. The ASTC data format specification is available here: -* [OES_texture_compression_astc](https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_compression_astc.txt) +* [Khronos Data Format Specification v1.2 # ASTC](https://www.khronos.org/registry/DataFormat/specs/1.2/dataformat.1.2.html#ASTC) # Encoder feature support
Sockeye: Checker code improvements
@@ -293,11 +293,10 @@ instance Checkable ParseAST.PortMap AST.PortMap where let mappedId = ParseAST.mappedId portMap mappedPort = ParseAST.mappedPort portMap - idents = [mappedId, mappedPort] - checkedIds <- check context idents + (checkedId, checkedPort) <- check context (mappedId, mappedPort) return $ AST.PortMap - { AST.mappedId = head checkedIds - , AST.mappedPort = last checkedIds + { AST.mappedId = checkedId + , AST.mappedPort = checkedPort } instance Checkable ParseAST.NodeDecl AST.NodeDecl where @@ -361,12 +360,10 @@ instance Checkable ParseAST.BlockSpec AST.BlockSpec where return AST.SingletonBlock { AST.address = checkedAddress } check context (ParseAST.RangeBlock base limit) = do - let - addresses = [base, limit] - checkedAddresses <- check context addresses + (checkedBase, checkedLimit) <- check context (base, limit) return AST.RangeBlock - { AST.base = head checkedAddresses - , AST.limit = last checkedAddresses + { AST.base = checkedBase + , AST.limit = checkedLimit } check context (ParseAST.LengthBlock base bits) = do checkedBase <- check context base @@ -425,11 +422,12 @@ instance Checkable a b => Checkable (ParseAST.For a) (AST.For b) where instance Checkable ParseAST.ForVarRange AST.ForRange where check context ast = do let - limits = [ParseAST.start ast, ParseAST.end ast] - checkedLimits <- check context limits + start = ParseAST.start ast + end = ParseAST.end ast + (checkedStart, checkedEnd) <- check context (start, end) return AST.ForRange - { AST.start = head checkedLimits - , AST.end = last checkedLimits + { AST.start = checkedStart + , AST.end = checkedEnd } instance Checkable ParseAST.ForLimit AST.ForLimit where @@ -441,6 +439,17 @@ instance Checkable ParseAST.ForLimit AST.ForLimit where instance Checkable a b => Checkable [a] [b] where check context as = forAll (check context) as + +instance (Checkable a c, Checkable b d) => Checkable (a, b) (c, d) where + check context (a, b) = + let + eitherC = check context a + eitherD = check context b + in case (eitherC, eitherD) of + (Right c, Right d) -> return (c, d) + (Left e1, Left e2) -> Left $ CheckFailure (concat $ map failedChecks [e1, e2]) + (Left e1, _) -> Left $ e1 + (_ , Left e2) -> Left $ e2 -- -- Helpers --
toml: Added NULL check
bool shouldWriteMetakey (const Key * meta) { + if (meta == NULL) + { + return false; + } const char * blackList[] = { "order", "origvalue", "tomltype", NULL }; for (size_t i = 0; blackList[i] != NULL; i++) { @@ -42,7 +46,7 @@ bool shouldWriteMetakey (const Key * meta) bool isMetakeyComment (const char * comment) { - return elektraStrNCmp (comment, METAKEY_COMMENT_PREFIX, sizeof (METAKEY_COMMENT_PREFIX) - 1) == 0; + return comment != NULL && elektraStrNCmp (comment, METAKEY_COMMENT_PREFIX, sizeof (METAKEY_COMMENT_PREFIX) - 1) == 0; } int writeMetakeyAsComment (const Key * meta, FILE * f)
ps8815: Add displayport related settings This patch adds one more register for displayport related settings with ps8815. BRANCH=firmware-volteer-13672.B-main TEST=make buildall
/* Vendor defined registers */ #define PS8815_P1_REG_HW_REVISION 0xF0 +/* + * Below register is defined from Parade PS8815 Register Table, + * See b:189587527 for more detail. + */ + +/* Displayport related settings */ +#define PS8815_REG_DP_EQ_SETTING 0xF8 +#define PS8815_AUTO_EQ_DISABLE BIT(7) +#define PS8815_DPEQ_LOSS_UP_21DB 0x09 +#define PS8815_DPEQ_LOSS_UP_20DB 0x08 +#define PS8815_DPEQ_LOSS_UP_19DB 0x07 +#define PS8815_DPEQ_LOSS_UP_18DB 0x06 +#define PS8815_DPEQ_LOSS_UP_17DB 0x05 +#define PS8815_DPEQ_LOSS_UP_16DB 0x04 +#define PS8815_DPEQ_LOSS_UP_13DB 0x03 +#define PS8815_DPEQ_LOSS_UP_12DB 0x02 +#define PS8815_DPEQ_LOSS_UP_10DB 0x01 +#define PS8815_DPEQ_LOSS_UP_9DB 0x00 +#define PS8815_REG_DP_EQ_COMP_SHIFT 3 +#define PS8815_AUX_INTERCEPTION_DISABLE BIT(1) + /* * PS8805 GPIO control register. Note the device I2C address of 0x1A is * independent of the ADDR pin on the chip, and not the same address being used
sixtop: add a comment about a design decision on Figure 31, RFC 8480
@@ -263,6 +263,13 @@ sixp_input(const uint8_t *buf, uint16_t len, const linkaddr_t *src_addr) seqno != pkt.seqno) { LOG_ERR("6P: sixp_input() fails because of invalid seqno [seqno:%u, %u]\n", seqno, pkt.seqno); + /* + * Figure 31 of RFC 8480 implies there is a chance to receive a + * 6P Response having RC_ERR_SEQNUM and SeqNum of 0. But, it + * shouldn't happen according to the definition of SeqNum + * described Section 3.2.2 of RFC 8480. We discard such a 6P + * Response silently without taking any action. + */ return; } }
Add label macro. A lexically scoped version of prompt is often useful.
(propagate ,r ,f))))) (defmacro prompt - "Set up a prompt point that can be aborted to. Tag should be a value + "Set up a checkpoint that can be returned to. Tag should be a value that is used in a return statement, like a keyword." [tag & body] (with-syms [res target payload fib] ,payload (propagate ,res ,fib))))) +(defmacro label + "Set a label point that is lexically scoped. Name should be a symbol + that will be bound to the label." + [name & body] + ~(do + (def ,name ',(gensym)) + ,(apply prompt name body))) + (defn return "Return to a prompt point." - [to value] + [to &opt value] (signal 0 [to value])) (defmacro with
added missing type to GroupType name attribute
<xs:element name="file" type="FileType" /> <xs:element name="group" type="GroupType" /> </xs:choice> - <xs:attribute name="name" use="required" /> + <xs:attribute name="name" type="xs:string" use="required" /> <!-- layer reference --> <xs:attribute name="layer" type="RestrictedString" use="optional" /> </xs:complexType>
Adding "backlog" label to exemptLabels. Just to make sure it doesn't get closed.
@@ -6,6 +6,7 @@ daysUntilClose: 7 exemptLabels: - pinned - security + - backlog # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable
Missing check on application error
@@ -3826,8 +3826,7 @@ const uint8_t* picoquic_decode_datagram_frame(picoquic_cnx_t* cnx, const uint8_t length = bytes_max - bytes; } - if (bytes != NULL) { - if (cnx->callback_fn != NULL) { + if (bytes != NULL && cnx->callback_fn != NULL) { /* submit the data to the app */ if (cnx->callback_fn(cnx, 0, (uint8_t*)bytes, (size_t)length, picoquic_callback_datagram, cnx->callback_ctx, NULL) != 0) { @@ -3835,7 +3834,7 @@ const uint8_t* picoquic_decode_datagram_frame(picoquic_cnx_t* cnx, const uint8_t bytes = NULL; } } - + if (bytes != NULL){ bytes += length; }
it83xx/flash: handle AP's command of get status while erasing This change makes EC handle get status command from AP while erasing. BRANCH=none TEST=Software sync works on Asurada.
@@ -502,6 +502,18 @@ int FLASH_DMA_CODE flash_physical_erase(int offset, int size) */ if (IS_ENABLED(IT83XX_CHIP_FLASH_IS_KGD) && (size > 0x10000)) watchdog_reload(); + /* + * EC still need to handle AP's EC_CMD_GET_COMMS_STATUS command + * during erasing. + */ +#ifdef IT83XX_IRQ_SPI_SLAVE + if (IS_ENABLED(CONFIG_SPI) && + IS_ENABLED(HAS_TASK_HOSTCMD) && + IS_ENABLED(CONFIG_HOST_COMMAND_STATUS)) { + if (IT83XX_SPI_RX_VLISR & IT83XX_SPI_RVLI) + task_trigger_irq(IT83XX_IRQ_SPI_SLAVE); + } +#endif } dma_reset_immu((v_addr + v_size) >= IMMU_TAG_INDEX_BY_DEFAULT); /* get the ILM address of a flash offset. */
arch/sim: fix visual studio Linker Tools Error LNK2019 nuttx_all.lib(up_initialstate.obj) : error LNK2019: unresolved external symbol '___builtin_frame_addres' referenced in function '_up_getsp' Return stack pointer from esp
@@ -77,7 +77,13 @@ extern "C" static inline uintptr_t up_getsp(void) { +#ifdef _MSC_VER + uintptr_t regval; + __asm mov regval, esp; + return regval; +#else return (uintptr_t)__builtin_frame_address(0); +#endif } /****************************************************************************
upstream: avoid dns timeout null event injection
@@ -842,10 +842,11 @@ int flb_upstream_conn_timeouts(struct mk_list *list) } if (drop == FLB_TRUE) { + if (u_conn->event.status != MK_EVENT_NONE) { mk_event_inject(u_conn->evl, &u_conn->event, MK_EVENT_READ | MK_EVENT_WRITE, FLB_TRUE); - + } u_conn->net_error = ETIMEDOUT; prepare_destroy_conn(u_conn); }
Encoder support for rIP relative addressing
@@ -541,6 +541,13 @@ static ZydisBool ZydisIsSPReg(ZydisRegister reg) reg == ZYDIS_REGISTER_RSP; } +static ZydisBool ZydisIsIPReg(ZydisRegister reg) +{ + return reg == ZYDIS_REGISTER_IP || + reg == ZYDIS_REGISTER_EIP || + reg == ZYDIS_REGISTER_RIP; +} + static ZydisBool ZydisIsStackReg(ZydisRegister reg) { return ZydisIsSPReg(reg) || ZydisIsBPReg(reg); @@ -572,9 +579,7 @@ static ZydisStatus ZydisPrepareMemoryOperand(ZydisEncoderContext* ctx, ZYDIS_ASSERT(operand); ZYDIS_ASSERT(tableEntry); - // TODO: RIP relative addressing - - // Absolute memory access? + // Absolute memory access? Special case. if (operand->mem.base == ZYDIS_REGISTER_NONE) { ctx->disp = operand->mem.disp.value.sdword; @@ -600,6 +605,34 @@ static ZydisStatus ZydisPrepareMemoryOperand(ZydisEncoderContext* ctx, return ZYDIS_STATUS_SUCCESS; } + // rIP relative addressing? Special case. + if (ZydisIsIPReg(operand->mem.base)) + { + // rIP addressing is only available since AMD64. + if (ctx->info->mode != ZYDIS_DISASSEMBLER_MODE_64BIT) + { + return ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION; // TODO + } + + // Only available with either EIP or RIP, not with IP. + if (operand->mem.base == ZYDIS_REGISTER_IP) + { + return ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION; // TODO + } + + ctx->disp = operand->mem.disp.value.sdword; + ctx->dispBitSize = 32; + ctx->info->details.modrm.mod = 0x00; + ctx->info->details.modrm.rm = 0x05 /* RIP relative mem */; + + if (operand->mem.base == ZYDIS_REGISTER_EIP) + { + ctx->info->attributes |= ZYDIS_ATTRIB_HAS_ADDRESSSIZE; + } + + return ZYDIS_STATUS_SUCCESS; + } + // Process base register. ZYDIS_CHECK(ZydisPrepareRegOperand(ctx, operand->mem.base, 'B'));
travis BUGFIX calling clang in sudo Travis installs clang into directories available only via login shell (not just via environment as tried in previous commit), so sudo must be invoked with -i option in case the command needs clang as in the case of building libpcre2.
@@ -60,7 +60,7 @@ jobs: - cd cmocka-1.1.2 && mkdir build && cd build && cmake .. && make -j2 && sudo make install && cd ../.. - wget https://ftp.pcre.org/pub/pcre/pcre2-10.30.tar.gz - tar -xzf pcre2-10.30.tar.gz - - cd pcre2-10.30 && ./configure && make -j2 && sudo -E make install && cd .. + - cd pcre2-10.30 && ./configure && make -j2 && sudo -i make install && cd .. script: - mkdir build && cd build && cmake .. && make -j2 && ctest --output-on-failure && cd - - stage: Test
Improve comments in utils/rel.h. Mark the fields that should be accessed via partitioning-related functions, as we already did for some other fields. Amit Langote Discussion:
@@ -95,10 +95,15 @@ typedef struct RelationData List *rd_fkeylist; /* list of ForeignKeyCacheInfo (see below) */ bool rd_fkeyvalid; /* true if list has been computed */ + /* data managed by RelationGetPartitionKey: */ PartitionKey rd_partkey; /* partition key, or NULL */ MemoryContext rd_partkeycxt; /* private context for rd_partkey, if any */ + + /* data managed by RelationGetPartitionDesc: */ PartitionDesc rd_partdesc; /* partition descriptor, or NULL */ MemoryContext rd_pdcxt; /* private context for rd_partdesc, if any */ + + /* data managed by RelationGetPartitionQual: */ List *rd_partcheck; /* partition CHECK quals */ bool rd_partcheckvalid; /* true if list has been computed */ MemoryContext rd_partcheckcxt; /* private cxt for rd_partcheck, if any */
Fix frame categorization
@@ -71,11 +71,13 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) && DWARF_GET_LOC(d->loc[rs->ret_addr_column]) == d->cfa-8 && (rs->reg.where[RBP] == DWARF_WHERE_UNDEF || rs->reg.where[RBP] == DWARF_WHERE_SAME + || rs->reg.where[RBP] == DWARF_WHERE_CFA || (rs->reg.where[RBP] == DWARF_WHERE_CFAREL && labs((long) rs->reg.val[RBP]) < (1 << 14) && rs->reg.val[RBP]+1 != 0)) && (rs->reg.where[RSP] == DWARF_WHERE_UNDEF || rs->reg.where[RSP] == DWARF_WHERE_SAME + || rs->reg.where[RSP] == DWARF_WHERE_CFA || (rs->reg.where[RSP] == DWARF_WHERE_CFAREL && labs((long) rs->reg.val[RSP]) < (1 << 14) && rs->reg.val[RSP]+1 != 0))) @@ -88,6 +90,10 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) f->rbp_cfa_offset = rs->reg.val[RBP]; if (rs->reg.where[RSP] == DWARF_WHERE_CFAREL) f->rsp_cfa_offset = rs->reg.val[RSP]; + if (rs->reg.where[RBP] == DWARF_WHERE_CFA) + f->rbp_cfa_offset = 0; + if (rs->reg.where[RSP] == DWARF_WHERE_CFA) + f->rsp_cfa_offset = 0; Debug (4, " standard frame\n"); }
Delete contrib/libs/libunwind.
- source_filter: "^contrib/libs/libunwind_master" includes: - unwind.h: contrib/libs/libunwind_master/include/unwind.h -- source_filter: "^contrib/libs/libunwind/" - includes: - - unwind.h: contrib/libs/libunwind/include/unwind.h - source_filter: "^contrib/libs/cppkafka" includes:
s2n_connection_set_protocol_preferences doc
@@ -905,6 +905,17 @@ int s2n_connection_set_cipher_preferences(struct s2n_connection *conn, const cha s2n_connection. Calling this function is not necessary unless you want to set the cipher preferences on the connection to something different than what is in the s2n_config. + +## s2n\_connection\_set\_protocol\_preferences + +```c +int s2n_connection_set_protocol_preferences(struct s2n_connection *conn, const char * const *protocols, int protocol_count); +``` + +**s2n_connection_set_protocol_preferences** sets the protocol preference override for the +s2n_connection. Calling this function is not necessary unless you want to set the +protocol preferences on the connection to something different than what is in the s2n_config. + ### s2n\_set\_server\_name ```c
Write ACK later to reduce conn_create_ack_frame call count
@@ -991,16 +991,7 @@ static ssize_t conn_write_handshake_pkt(ngtcp2_conn *conn, uint8_t *dest, ctx.user_data = conn; - if (type != NGTCP2_PKT_0RTT_PROTECTED) { - rv = conn_create_ack_frame(conn, &ackfr, &pktns->acktr, ts, - NGTCP2_DEFAULT_ACK_DELAY_EXPONENT); - if (rv != 0) { - return rv; - } - } - - if (ngtcp2_pq_empty(&pktns->cryptofrq) && !ackfr && - type != NGTCP2_PKT_0RTT_PROTECTED) { + if (ngtcp2_pq_empty(&pktns->cryptofrq) && type != NGTCP2_PKT_0RTT_PROTECTED) { return 0; } @@ -1015,21 +1006,6 @@ static ssize_t conn_write_handshake_pkt(ngtcp2_conn *conn, uint8_t *dest, ngtcp2_log_tx_pkt_hd(&conn->log, &hd); - if (ackfr) { - rv = conn_ppe_write_frame(conn, &ppe, &hd, ackfr); - if (rv != 0) { - assert(NGTCP2_ERR_NOBUF == rv); - ngtcp2_mem_free(conn->mem, ackfr); - } else { - ngtcp2_acktr_commit_ack(&pktns->acktr); - ack_ent = ngtcp2_acktr_add_ack(&pktns->acktr, hd.pkt_num, &ackfr->ack, ts, - 0 /* ack_only */); - /* Now ackfr is owned by conn->acktr. */ - pkt_empty = 0; - } - ackfr = NULL; - } - /* TODO pktns->frq is not used during handshake */ assert(pktns->frq == NULL); @@ -1115,6 +1091,29 @@ static ssize_t conn_write_handshake_pkt(ngtcp2_conn *conn, uint8_t *dest, return 0; } + if (type != NGTCP2_PKT_0RTT_PROTECTED) { + rv = conn_create_ack_frame(conn, &ackfr, &pktns->acktr, ts, + NGTCP2_DEFAULT_ACK_DELAY_EXPONENT); + if (rv != 0) { + return rv; + } + } + + if (ackfr) { + rv = conn_ppe_write_frame(conn, &ppe, &hd, ackfr); + if (rv != 0) { + assert(NGTCP2_ERR_NOBUF == rv); + ngtcp2_mem_free(conn->mem, ackfr); + } else { + ngtcp2_acktr_commit_ack(&pktns->acktr); + ack_ent = ngtcp2_acktr_add_ack(&pktns->acktr, hd.pkt_num, &ackfr->ack, ts, + 0 /* ack_only */); + /* Now ackfr is owned by conn->acktr. */ + pkt_empty = 0; + } + ackfr = NULL; + } + /* If we cannot write another packet, then we need to add padding to Initial here. */ if (conn_should_pad_pkt(conn, type, ngtcp2_ppe_left(&ppe), early_datalen)) {
added missing newline to error report
@@ -5275,7 +5275,7 @@ else { if(ifa->ifa_addr->sa_family != AF_PACKET) { - printf("getifaddrs() - ifa_name failed"); + printf("getifaddrs() - ifa_name failed\n"); drivererrorflag = true; } }
fix: use sane value for json_tokener max_depth INT_MAX causes a NULL pointer if there is not enough memory available to fit (INT_MAX * sizeof(struct json_tokener_srec)).
#define _POSIX_C_SOURCE 200809L + +// arbitrary number, it's probably sufficient, higher number = more memory usage +#define JSON_MAX_DEPTH 512 + #include <limits.h> #include <stdio.h> #include <stdlib.h> @@ -481,7 +485,7 @@ int main(int argc, char **argv) { char *resp = ipc_single_command(socketfd, type, command, &len); // pretty print the json - json_tokener *tok = json_tokener_new_ex(INT_MAX); + json_tokener *tok = json_tokener_new_ex(JSON_MAX_DEPTH); if (tok == NULL) { sway_log(SWAY_ERROR, "failed allocating json_tokener"); ret = 1; @@ -525,7 +529,7 @@ int main(int argc, char **argv) { break; } - json_tokener *tok = json_tokener_new_ex(INT_MAX); + json_tokener *tok = json_tokener_new_ex(JSON_MAX_DEPTH); if (tok == NULL) { sway_log(SWAY_ERROR, "failed allocating json_tokener"); ret = 1;
Update dwc2_stm32.h Support STM32H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx
#define EP_FIFO_SIZE_FS 4096 #define EP_MAX_HS 9 #define EP_FIFO_SIZE_HS 4096 + #if (! defined USB2_OTG_FS) + // H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx + // USB_OTG_FS_PERIPH_BASE and OTG_FS_IRQn not defined + #define USB_OTG_FS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE + #define OTG_FS_IRQn OTG_HS_IRQn #elif CFG_TUSB_MCU == OPT_MCU_STM32F7 #include "stm32f7xx.h"
Allow setting mchp hexmate location from a variable
@@ -321,9 +321,15 @@ set(xc32_bin2hex ${XC32_BIN}/xc32-bin2hex) set(xc32_objcopy ${XC32_BIN}/xc32-objcopy) set(output_file "$<TARGET_FILE_DIR:${exe_target}>/${exe_target}.hex") +# Locate microchip hexmate. +set(MCHP_HEXMATE_PATH "" CACHE STRING "Path to microchip hexmate, usually this should be mplab's path") +find_program(hexmate_path hexmate PATHS ${MCHP_HEXMATE_PATH} PATH_SUFFIXES bin) +if(NOT hexmate_path) + message(FATAL_ERROR "Cannot find microchip's hexmate tool.") +endif() + # These locations have to be generalized through the toolchain # We may have to re-build the bootloader hex file? -set(hexmate_dir /Applications/microchip/xc8/v2.05/pic/bin) set(bl_hex_file ${AFR_ROOT_DIR}/vendors/microchip/boards/curiosity_pic32mzef/bootloader/aws_bootloader.X/dist/pic32mz_ef_curiosity/production/aws_bootloader.X.production.hex) add_custom_command( @@ -336,5 +342,5 @@ add_custom_command( COMMAND "echo" "Creating binary image" COMMAND "python" ${AFR_DEMOS_DIR}/ota/bootloader/utility/ota_image_generator.py -b $<TARGET_FILE_DIR:${exe_target}>/${exe_target}.intermediate.bin -p MCHP-Curiosity-PIC32MZEF COMMAND "echo" "Running Hexmate to combine bootloader with image" -# COMMAND "${hexmate_dir}/hexmate" $<TARGET_FILE_DIR:${exe_target}>/${exe_target}.hex ${bl_hex_file} -O${exe_target}_image.hex + COMMAND "${hexmate_path}" $<TARGET_FILE_DIR:${exe_target}>/${exe_target}.hex ${bl_hex_file} -O${exe_target}_image.hex )
in_tail: free memory if allocated by expand_tilde Only free memory when it is actually allocated by expand_tilde, otherwise we're freeing memory that shouldn't be freed (at least not here).
@@ -152,8 +152,10 @@ static inline int do_glob(const char *pattern, int flags, /* invoke glob with new parameters */ ret = glob(pattern, new_flags, NULL, pglob); - /* remove temporary buffer */ - if (tmp != NULL) { + /* remove temporary buffer, if allocated by expand_tilde above. + * Note that this buffer is only used for libc implementations + * that do not support the GLOB_TILDE flag, like musl. */ + if (tmp != NULL && tmp != pattern) { flb_free(tmp); }
imlib: Fix imlib_rgb565_to_l output. It should not be negative when the imlib_rgb565_to_l function input is zero, e.g. y=0.137931f, fast_floorf(116 * 0.137931f) = 15.999996, 15.999996 - 16 < 0.
@@ -412,7 +412,7 @@ int8_t imlib_rgb565_to_l(uint16_t pixel) y = (y>0.008856f) ? fast_cbrtf(y) : ((y * 7.787037f) + 0.137931f); - return fast_floorf(116 * y) - 16; + return IM_MAX(IM_MIN(fast_floorf(116 * y) - 16, COLOR_L_MAX), COLOR_L_MIN); } int8_t imlib_rgb565_to_a(uint16_t pixel) @@ -427,7 +427,7 @@ int8_t imlib_rgb565_to_a(uint16_t pixel) x = (x>0.008856f) ? fast_cbrtf(x) : ((x * 7.787037f) + 0.137931f); y = (y>0.008856f) ? fast_cbrtf(y) : ((y * 7.787037f) + 0.137931f); - return fast_floorf(500 * (x-y)); + return IM_MAX(IM_MIN(fast_floorf(500 * (x-y)), COLOR_A_MAX), COLOR_A_MIN); } int8_t imlib_rgb565_to_b(uint16_t pixel) @@ -442,7 +442,7 @@ int8_t imlib_rgb565_to_b(uint16_t pixel) y = (y>0.008856f) ? fast_cbrtf(y) : ((y * 7.787037f) + 0.137931f); z = (z>0.008856f) ? fast_cbrtf(z) : ((z * 7.787037f) + 0.137931f); - return fast_floorf(200 * (y-z)); + return IM_MAX(IM_MIN(fast_floorf(200 * (y-z)), COLOR_B_MAX), COLOR_B_MIN); } // https://en.wikipedia.org/wiki/Lab_color_space -> CIELAB-CIEXYZ conversions
minor notebook fix
"plt.title('Relative difference') \n", "plt.savefig('benchmark_rel.pdf',bbox_inches = 'tight')\n", "plt.show()\n", - "print frac_diff\n", + "#print frac_diff\n", "print(f'Max frac diff for s = 0.1-100: {np.amax(frac_diff1)}')\n", "print(f'Max frac diff for s = 50-250: {np.amax(frac_diff2)}')" ]
usb_ppc: Fix broken tests build Define ppc_prints and ppc_err_prints (to do nothing) for test builds. TEST=make tests BOARD=ampton BRANCH=none Tested-by: Patryk Duda
#ifndef TEST_BUILD #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args) +#else +#define CPRINTF(args...) +#define CPRINTS(args...) +#endif int ppc_prints(const char *string, int port) { +#ifndef TEST_BUILD return CPRINTS("ppc p%d %s", port, string); +#else + return 0; +#endif } int ppc_err_prints(const char *string, int port, int error) { +#ifndef TEST_BUILD return CPRINTS("ppc p%d %s (%d)", port, string, error); -} #else -#define CPRINTF(args...) -#define CPRINTS(args...) -#define ppc_prints(string, port) -#define ppc_err_prints(string, port, error) + return 0; #endif +} /* * A per-port table that indicates how many VBUS overcurrent events have
Add genFilenameLineComments.
@@ -16,22 +16,41 @@ package cgen import ( "fmt" + "strings" a "github.com/google/puffs/lang/ast" t "github.com/google/puffs/lang/token" ) +// genFilenameLineComments is whether to print "// foo.puffs:123\n" comments in +// the generated code. This can be useful for debugging, although it is not +// enabled by default as it can lead to many spurious changes in the generated +// C code (due to line numbers changing) when editing Puffs code. +const genFilenameLineComments = false + func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error { if depth > a.MaxBodyDepth { return fmt.Errorf("body recursion depth too large") } depth++ - switch n.Kind() { - case a.KAssert: + if n.Kind() == a.KAssert { // Assertions only apply at compile-time. return nil + } + + if genFilenameLineComments { + filename, line := n.Raw().FilenameLine() + if i := strings.LastIndexByte(filename, '/'); i >= 0 { + filename = filename[i+1:] + } + if i := strings.LastIndexByte(filename, '\\'); i >= 0 { + filename = filename[i+1:] + } + b.printf("// %s:%d\n", filename, line) + } + switch n.Kind() { case a.KAssign: n := n.Assign() if err := g.writeSuspendibles(b, n.LHS(), depth); err != nil { @@ -95,7 +114,7 @@ func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error { } } if bif := n.BodyIfFalse(); len(bif) > 0 { - b.writes("} else {") + b.writes("} else {\n") for _, o := range bif { if err := g.writeStatement(b, o, depth); err != nil { return err
FIPS Checksums: checkout the head of the base repo as pristine
@@ -18,7 +18,8 @@ jobs: mkdir ./artifact - uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.base.sha }} + repository: ${{ github.event.pull_request.base.repo.full_name }} + ref: ${{ github.event.pull_request.base.ref }} path: source-pristine - name: config pristine run: ../source-pristine/config enable-fips && perl configdata.pm --dump
chip/mt8192_scp: change clock source to ULPOSC for UART 26M clock cannot be used when AP enters S3. Changes the clock source to ULPOSC instead. Note: it is still 26M. BRANCH=none TEST=powerd_dbus_suspend
@@ -25,19 +25,18 @@ static uint8_t init_done, tx_started; void uart_init(void) { const uint32_t baud_rate = CONFIG_UART_BAUD_RATE; - /* TODO: use ULPOSC1 for S3 */ const uint32_t uart_clock = 26000000; const uint32_t div = DIV_ROUND_NEAREST(uart_clock, baud_rate * 16); #if UARTN == 0 - SCP_UART_CK_SEL |= UART0_CK_SEL_VAL(UART_CK_SEL_26M); + SCP_UART_CK_SEL |= UART0_CK_SEL_VAL(UART_CK_SEL_ULPOSC); SCP_SET_CLK_CG |= CG_UART0_MCLK | CG_UART0_BCLK | CG_UART0_RST; /* set AP GPIO164 and GPIO165 to alt func 3 */ AP_GPIO_MODE20_CLR = 0x00770000; AP_GPIO_MODE20_SET = 0x00330000; #elif UARTN == 1 - SCP_UART_CK_SEL |= UART1_CK_SEL_VAL(UART_CK_SEL_26M); + SCP_UART_CK_SEL |= UART1_CK_SEL_VAL(UART_CK_SEL_ULPOSC); SCP_SET_CLK_CG |= CG_UART1_MCLK | CG_UART1_BCLK | CG_UART1_RST; #endif
[mod_webdav] one fewer buffer copy for COPY,MOVE one fewer buffer copy of Destination for COPY,MOVE
@@ -102,7 +102,6 @@ INIT_FUNC(mod_webdav_init) { p->tmp_buf = buffer_init(); p->uri.scheme = buffer_init(); - p->uri.path_raw = buffer_init(); p->uri.path = buffer_init(); p->uri.authority = buffer_init(); @@ -154,7 +153,6 @@ FREE_FUNC(mod_webdav_free) { } buffer_free(p->uri.scheme); - buffer_free(p->uri.path_raw); buffer_free(p->uri.path); buffer_free(p->uri.authority); @@ -1961,10 +1959,6 @@ SUBREQUEST_FUNC(mod_webdav_subrequest_handler_huge) { * - the query string is thrown away * */ - buffer_reset(p->uri.scheme); - buffer_reset(p->uri.path_raw); - buffer_reset(p->uri.authority); - start = destination->ptr; if (NULL == (sep = strstr(start, "://"))) { @@ -1989,9 +1983,9 @@ SUBREQUEST_FUNC(mod_webdav_subrequest_handler_huge) { if (NULL == (sep = strchr(start, '?'))) { /* no query string, good */ - buffer_copy_string(p->uri.path_raw, start); + buffer_copy_string(p->uri.path, start); } else { - buffer_copy_string_len(p->uri.path_raw, start, sep - start); + buffer_copy_string_len(p->uri.path, start, sep - start); } if (!buffer_is_equal(p->uri.authority, con->uri.authority)) { @@ -2000,9 +1994,8 @@ SUBREQUEST_FUNC(mod_webdav_subrequest_handler_huge) { return HANDLER_FINISHED; } - buffer_copy_buffer(p->tmp_buf, p->uri.path_raw); - buffer_urldecode_path(p->tmp_buf); - buffer_path_simplify(p->uri.path, p->tmp_buf); + buffer_urldecode_path(p->uri.path); + buffer_path_simplify(p->uri.path, p->uri.path); /* we now have a URI which is clean. transform it into a physical path */ buffer_copy_buffer(p->physical.doc_root, con->physical.doc_root);
Fix y_parity signature for eip1559 and eip2930
@@ -28,6 +28,13 @@ unsigned int io_seproxyhal_touch_tx_ok(const bagl_element_t *e) { sizeof(signature), &info); explicit_bzero(&privateKey, sizeof(privateKey)); + if (txContext.txType == EIP1559 || txContext.txType == EIP2930) { + if (info & CX_ECCINFO_PARITY_ODD) { + G_io_apdu_buffer[0] = 1; + } else { + G_io_apdu_buffer[0] = 0; + } + } else { // Parity is present in the sequence tag in the legacy API if (tmpContent.txContent.vLength == 0) { // Legacy API @@ -43,6 +50,7 @@ unsigned int io_seproxyhal_touch_tx_ok(const bagl_element_t *e) { if (info & CX_ECCINFO_xGTn) { G_io_apdu_buffer[0] += 2; } + } format_signature_out(signature); tx = 65; G_io_apdu_buffer[tx++] = 0x90;
FIX ifftc for odd dimensions
@@ -1028,7 +1028,10 @@ static struct linop_s* linop_fft_create_priv(int N, const long dims[N], unsigned complex float one[1] = { 1. }; md_fill(N, dims, fftmod_mat, one, CFL_SIZE); + if (forward) fftmod(N, dims, flags, fftmodk_mat, fftmod_mat); + else + ifftmod(N, dims, flags, fftmodk_mat, fftmod_mat); fftscale(N, dims, flags, fftmod_mat, fftmodk_mat); struct linop_s* mod = linop_cdiag_create(N, dims, ~0u, fftmod_mat);
fix target.h
#define GEPRCF411 -#define F4 -#define F411 - //PORTS #define SPI_PORTS \ SPI1_PA5PA6PA7 \ #define BUZZER_PIN PIN_B2 //GYRO -#define MPU6XXX_SPI_PORT SPI_PORT1 -#define MPU6XXX_NSS PIN_A4 -#define MPU6XXX_INT PIN_A1 +#define GYRO_SPI_PORT SPI_PORT1 +#define GYRO_NSS PIN_A4 +#define GYRO_INT PIN_A1 #define GYRO_ORIENTATION GYRO_ROTATE_90_CCW -#define USE_DUMMY_I2C //RADIO #ifdef SERIAL_RX #define RX_USART USART_PORT2 -#define SOFTSPI_NONE #endif // OSD //VOLTAGE DIVIDER -#define BATTERYPIN PIN_B0 -#define BATTERY_ADC_CHANNEL ADC_Channel_8 -#define VOLTAGE_DIVIDER_R1 10000 -#define VOLTAGE_DIVIDER_R2 1000 - -#define ADC_REF_VOLTAGE 3.3 +#define VBAT_PIN PIN_B0 +#define VBAT_DIVIDER_R1 10000 +#define VBAT_DIVIDER_R2 1000 #define IBAT_PIN PIN_B1 #define IBAT_SCALE 179
Localise add button elements
@@ -110,19 +110,19 @@ class ToolPicker extends Component { onClick={this.setTool("actors")} title={`${l10n("TOOL_ADD_ACTOR_LABEL")} (a)`} > - Actor + {l10n("ACTOR")} </MenuItem> <MenuItem onClick={this.setTool("triggers")} title={`${l10n("TOOL_ADD_TRIGGER_LABEL")} (t)`} > - Trigger + {l10n("TRIGGER")} </MenuItem> <MenuItem onClick={this.setTool("scene")} title={`${l10n("TOOL_ADD_SCENE_LABEL")} (s)`} > - Scene + {l10n("SCENE")} </MenuItem> </Menu> )}
Use cuCrealf instead of cuCabsf for cuda_zexpj - supports negative numbers correctly
@@ -528,7 +528,7 @@ __global__ void kern_zexpj(int N, cuFloatComplex* dst, const cuFloatComplex* src for (int i = start; i < N; i += stride) { - float abs = cuCabsf(src[i]); // moved out, otherwise it triggers a compiler error in nvcc + float abs = cuCrealf(src[i]); // moved out, otherwise it triggers a compiler error in nvcc dst[i] = zexp(make_cuFloatComplex(0., abs)); } }
fix to remove tmp_dir from arch exclusion list
@@ -121,7 +121,7 @@ foreach my $distro (@distros) { # exclude other arches, iso and src dirs my @n_arches = grep { $_ ne $arch } @arches; for my $n_arch (@n_arches) { - $tar_args .= "--exclude $tmp_dir/$distro/$n_arch \\\n"; + $tar_args .= "--exclude $distro/$n_arch \\\n"; } $tar_args .= "--exclude $distro/iso \\\n"; $tar_args .= "--exclude $distro/src \\\n";
Added API Endpoint /api/help returning a quick summary of available API routes
using Autofac; using AutoMapper; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Infrastructure; +using Microsoft.AspNetCore.Mvc.Internal; using Miningcore.Api.Extensions; using Miningcore.Api.Responses; using Miningcore.Blockchain; @@ -14,6 +16,7 @@ using Miningcore.Persistence.Repositories; using Miningcore.Time; using System; using System.Collections.Concurrent; +using System.Collections.Generic; using System.Data; using System.Globalization; using System.Linq; @@ -26,7 +29,7 @@ namespace Miningcore.Api.Controllers [ApiController] public class PoolApiController : ControllerBase { - public PoolApiController(IComponentContext ctx) + public PoolApiController(IComponentContext ctx, IActionDescriptorCollectionProvider _adcp) { clusterConfig = ctx.Resolve<ClusterConfig>(); cf = ctx.Resolve<IConnectionFactory>(); @@ -36,6 +39,7 @@ namespace Miningcore.Api.Controllers mapper = ctx.Resolve<IMapper>(); clock = ctx.Resolve<IMasterClock>(); pools = ctx.Resolve<ConcurrentDictionary<string, IMiningPool>>(); + adcp = _adcp; } private readonly ClusterConfig clusterConfig; @@ -45,6 +49,7 @@ namespace Miningcore.Api.Controllers private readonly IPaymentRepository paymentsRepo; private readonly IMapper mapper; private readonly IMasterClock clock; + private readonly IActionDescriptorCollectionProvider adcp; private readonly ConcurrentDictionary<string, IMiningPool> pools; #region Actions @@ -84,6 +89,25 @@ namespace Miningcore.Api.Controllers return response; } + [HttpGet("/api/help")] + public ActionResult GetHelp() + { + var tmp = adcp.ActionDescriptors.Items + .Select(x => + { + // Get and pad http method + var method = x?.ActionConstraints?.OfType<HttpMethodActionConstraint>().FirstOrDefault()?.HttpMethods.First(); + method = String.Format("{0,-5}", method); + + return $"{method} -> {x.AttributeRouteInfo.Template}"; + }); + + // convert curly braces + var result = string.Join("\n", tmp).Replace("{", "<").Replace("}", ">"); + + return Content(result); + } + [HttpGet("{poolId}")] public async Task<GetPoolResponse> GetPoolInfoAsync(string poolId) {
[docs] - Move manifest file name outside code block in SOURCEINSTALL.md
@@ -65,14 +65,12 @@ There is a "list" option on the clone\_aomp.sh that provides useful information $AOMP_REPOS/aomp/bin/clone_aomp.sh list ``` The above command will produce output like this showing you the location and branch of the repos in the AOMP\_REPOS directory and if there are any discrepencies with respect to the manifest file. -``` - <b>Development Branch:</b> MANIFEST FILE: ~/git/aomp16.0/aomp/bin/../manifests/aomp_16.0.xml <b>Release Branch:</b> MANIFEST FILE: ~/git/aomp15.0/aomp/bin/../manifests/aomp_15.0.xml - +``` repo src branch path repo name last hash updated commitor for author -------- ------ ---- --------- --------- ------- -------- ---------- gerritgit amd-stg-open llvm-project lightning/ec/llvm-project 11d5fa11d52c 2021-10-30 Ron Lieberman Saiyedul Islam
delete class declare
@@ -55,37 +55,10 @@ typedef struct float moment; } Inertia; - -class Manipulator; -class Link; -class Base; -class Joint; -class Tool; - Eigen::Vector3f makeEigenVector3(float v1, float v2, float v3); Eigen::Matrix3f makeEigenMatrix3(float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33); Eigen::Matrix3f makeRotationMatrix(float roll, float pitch, float yaw); -template <int8_t type_, int8_t joint_size_, int8_t link_size_, int8_t tool_size> -class Manipulator -{ - private: - int8_t dof_; - - public: - Base base_; - Joint joint_[joint_size_]; - Link link_[link_size_]; - Tool tool_[tool_size]; - - /////////////////func/////////////////// - Manipulator(int8_t dof); - ~Manipulator(); - - void setDOF(int8_t dof); - //////////////////////////////////////// -}; - class Joint { private: @@ -125,7 +98,7 @@ class Link private: int8_t inner_joint_size_; Inertia inertia_; - vector<InnerJoint> inner_joint_(1); + vector<InnerJoint> inner_joint_; Eigen::Vector3f center_position_; public: @@ -200,5 +173,25 @@ class Tool: public Link //////////////////////////////////////// }; +template <int8_t TYPE, int8_t JOINT_SIZE, int8_t LINK_SIZE, int8_t TOOL_SIZE> +class Manipulator +{ + private: + int8_t dof_; + + public: + Base base_; + Joint joint_[JOINT_SIZE]; + Link link_[LINK_SIZE]; + Tool tool_[TOOL_SIZE]; + + /////////////////func/////////////////// + Manipulator(int8_t dof); + ~Manipulator(); + + void setDOF(int8_t dof); + //////////////////////////////////////// +}; + #endif // OMMANAGER_H_
If trying to delete last frame in animation, delete all tiles rather than removing frame
@@ -1720,6 +1720,13 @@ const removeMetasprite: CaseReducer< state.spriteAnimations.entities[action.payload.spriteAnimationId]; if (!spriteAnimation || spriteAnimation.frames.length <= 1) { + // Remove tiles if only frame in animation + metaspritesAdapter.updateOne(state.metasprites, { + id: action.payload.metaspriteId, + changes: { + tiles: [], + }, + }); return; }
kukui: enlarge stack for hook_task We are seeing a stack overflow from hook_task. Enlarge it to prevent from crashing. TEST=not seeing a EC crash BRANCH=kukui
* See CONFIG_TASK_LIST in config.h for details. */ #define CONFIG_TASK_LIST \ - TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_ALWAYS(HOOKS, hook_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG, usb_charger_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \
schema parser DOC remove misleading comment Fixes
@@ -113,7 +113,7 @@ LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, cons * * @param[in] ctx libyang context where to process the data model. * @param[in] data The string containing the dumped data model in the specified format. - * @param[in] format Format of the schema to parse. Can be 0 to try to detect format from the input handler. + * @param[in] format Format of the schema to parse. * @param[out] module Optional parsed module. * @return LY_ERR value. */ @@ -130,7 +130,7 @@ LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, * @param[in] ctx libyang context where to process the data model. * @param[in] fd File descriptor of a regular file (e.g. sockets are not supported) containing the schema * in the specified format. - * @param[in] format Format of the schema to parse. Can be 0 to try to detect format from the input handler. + * @param[in] format Format of the schema to parse. * @param[out] module Optional parsed module. * @return LY_ERR value. */ @@ -144,7 +144,7 @@ LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, const struc * * @param[in] ctx libyang context where to process the data model. * @param[in] path Path to the file with the model in the specified format. - * @param[in] format Format of the schema to parse. Can be 0 to try to detect format from the input handler. + * @param[in] format Format of the schema to parse. * @param[out] module Optional parsed module. * @return LY_ERR value. */
Remove incorrect PSA ECB definition There is no PSA ALG_ECB, only ALG_ECB_NO_PADDING. Fix one incorrect declaration, and remove another that is just redundant.
@@ -328,7 +328,7 @@ extern "C" { #endif /* PSA_WANT_ALG_XTS */ #if defined(PSA_WANT_ALG_ECB_NO_PADDING) -#define MBEDTLS_PSA_BUILTIN_ALG_ECB 1 +#define MBEDTLS_PSA_BUILTIN_ALG_ECB_NO_PADDING 1 #endif #if defined(PSA_WANT_ALG_CBC_NO_PADDING) @@ -509,7 +509,6 @@ extern "C" { #if defined(MBEDTLS_AES_C) || defined(MBEDTLS_DES_C) || \ defined(MBEDTLS_CAMELLIA_C) -#define MBEDTLS_PSA_BUILTIN_ALG_ECB 1 #define MBEDTLS_PSA_BUILTIN_ALG_ECB_NO_PADDING 1 #define PSA_WANT_ALG_ECB_NO_PADDING 1 #endif
create training dir if it not exist in GPU
@@ -221,7 +221,6 @@ namespace NCatboostCuda { NCatboostOptions::TCatBoostOptions& catBoostOptions, NCatboostOptions::TOutputFilesOptions& outputOptions, TBinarizedFeaturesManager& featuresManager) { - UpdateBoostingTypeOption(dataProvider.GetSampleCount(), &catBoostOptions.BoostingOptions->BoostingType); @@ -245,7 +244,6 @@ namespace NCatboostCuda { UpdateLeavesEstimation(!dataProvider.IsTrivialWeights(), &catBoostOptions); } - inline TFullModel TrainModelImpl(const NCatboostOptions::TCatBoostOptions& trainCatBoostOptions, const NCatboostOptions::TOutputFilesOptions& outputOptions, const TDataProvider& dataProvider, @@ -283,12 +281,25 @@ namespace NCatboostCuda { return result; } + + inline void CreateDirIfNotExist(const TString& path) { + TFsPath trainDirPath(path); + try { + if (!path.empty() && !trainDirPath.Exists()) { + trainDirPath.MkDir(); + } + } catch (...) { + ythrow TCatboostException() << "Can't create working dir: " << path + } + } + TFullModel TrainModel(const NCatboostOptions::TCatBoostOptions& trainCatBoostOptions, const NCatboostOptions::TOutputFilesOptions& outputOptions, const TDataProvider& dataProvider, const TDataProvider* testProvider, TBinarizedFeaturesManager& featuresManager) { SetLogingLevel(trainCatBoostOptions.LoggingLevel); + CreateDirIfNotExist(outputOptions.GetTrainDir()); auto deviceRequestConfig = CreateDeviceRequestConfig(trainCatBoostOptions); auto stopCudaManagerGuard = StartCudaManager(deviceRequestConfig, trainCatBoostOptions.LoggingLevel);
Add command line option to control transport protocol Add -s to enforce SCTP and -t to enforce TCP. The default is to use SCTP and TCP.
-c : number of contexts (default: 1) -R : receive buffer size in byte -v : log level (0 .. 4) + -t : use tcp as transport protocol + -s : use sctp as transport protocol Each new flow will be put on the next context (if more than one context is specified) and when reaching the end of the total number of contexts, it @@ -30,7 +32,7 @@ static uint32_t config_max_flows = 500; static uint32_t config_max_ctxs = 50; static char request[512]; static const char *request_tail = "HTTP/1.0\r\nUser-agent: libneat\r\nConnection: close\r\n\r\n"; -static char *config_property = "{\ +static char *config_property_sctp_tcp = "{\ \"transport\": [\ {\ \"value\": \"SCTP\",\ @@ -46,6 +48,26 @@ static char *config_property = "{\ }\ ]\ }";\ +static char *config_property_tcp = "{\ + \"transport\": [\ + {\ + \"value\": \"TCP\",\ + \"precedence\": 1\ + }\ + ]\ +}";\ +static char *config_property_sctp = "{\ + \"transport\": [\ + {\ + \"value\": \"SCTP\",\ + \"precedence\": 1\ + },\ + {\ + \"value\": \"SCTP/UDP\",\ + \"precedence\": 1\ + }\ + ]\ +}";\ static neat_error_code on_error(struct neat_flow_operations *opCB) @@ -120,16 +142,18 @@ main(int argc, char *argv[]) int backend_fds[config_max_ctxs]; int streams_going = 0; uint32_t num_ctxs = 1; - result = EXIT_SUCCESS; int config_log_level = NEAT_LOG_WARNING; + const char *config_property; + result = EXIT_SUCCESS; memset(&ops, 0, sizeof(ops)); memset(flows, 0, sizeof(flows)); memset(ctx, 0, sizeof(ctx)); + config_property = config_property_sctp_tcp; snprintf(request, sizeof(request), "GET %s %s", "/", request_tail); - while ((arg = getopt(argc, argv, "u:n:c:R:v:")) != -1) { + while ((arg = getopt(argc, argv, "u:n:c:sR:tv:")) != -1) { switch(arg) { case 'u': snprintf(request, sizeof(request), "GET %s %s", optarg, request_tail); @@ -158,6 +182,12 @@ main(int argc, char *argv[]) fprintf(stderr, "%s - option - log level: %d\n", __func__, config_log_level); break; + case 's': + config_property = config_property_sctp; + break; + case 't': + config_property = config_property_tcp; + break; default: fprintf(stderr, "usage: client_http_run_once [OPTIONS] HOST\n" " -u <path> - to send with GET\n"
Fix gbdkjs compile error
@@ -27,7 +27,7 @@ extern UBYTE script_ptr_bank; extern UBYTE *script_start_ptr; extern UBYTE script_cmd_args[6]; extern UBYTE script_cmd_args_len; -extern SCRIPT_CMD script_cmds[]; +extern const SCRIPT_CMD script_cmds[]; extern UBYTE *script_ptr; extern UWORD script_ptr_x; extern UWORD script_ptr_y;
Build stl header units only when not present and add dummy append_headerunits_objectfiles function
@@ -167,10 +167,11 @@ function generate_stl_headerunits_for_batchcmds(target, batchcmds, headerunits, local depmtime = 0 for _, headerunit in ipairs(headerunits) do local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension()) + if not os.isfile(bmifile) then local args = { "-c", "-x", "c++-system-header", headerunit.name } - batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name) batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args)) + end _add_module_to_mapper(mapper_file, headerunit.path, path.absolute(bmifile, projectdir)) depmtime = math.max(depmtime, os.mtime(bmifile)) @@ -334,3 +335,7 @@ function get_depoutputflag(target) end return depoutputflag or nil end + +-- no .o generated by header units on GCC +function append_headerunits_objectfiles(target) +end \ No newline at end of file
interop: Enable chacha20 test case
# - CLIENT_PARAMS contains user-supplied command line parameters case $TESTCASE in - versionnegotiation|handshake|transfer|retry|resumption|http3|multiconnect|zerortt) + versionnegotiation|handshake|transfer|retry|resumption|http3|multiconnect|zerortt|chacha20) : ;; *) @@ -26,6 +26,9 @@ if [ "$ROLE" == "client" ]; then if [ "$TESTCASE" == "versionnegotiation" ]; then CLIENT_ARGS="$CLIENT_ARGS -v 0xaaaaaaaa" fi + if [ "$TESTCASE" == "chacha20" ]; then + CLIENT_ARGS="$CLIENT_ARGS --ciphers=TLS_CHACHA20_POLY1305_SHA256" + fi if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt" if [ "$TESTCASE" == "resumption" ]; then
Set log level when setting debug level Making sure that we set the log level in the C library when user sets the debug level via the Fortran interface. Fixes
@@ -16,6 +16,7 @@ module piolib_mod pio_noerr, pio_rearr_subset, pio_rearr_opt_t !-------------- use pio_support, only : piodie, debug, debugio, debugasync, checkmpireturn + use pio_nf, only : pio_set_log_level ! @@ -331,6 +332,7 @@ contains !< subroutine setdebuglevel(level) integer(i4), intent(in) :: level + integer :: ierr if(level.eq.0) then debug=.false. debugio=.false. @@ -359,7 +361,11 @@ contains debug=.true. debugio=.true. debugasync=.true. - + end if + ierr = PIO_set_log_level(level) + if(ierr /= PIO_NOERR) then + ! This is not a fatal error + print *, __PIO_FILE__, __LINE__, "Setting log level failed, ierr =",ierr end if end subroutine setdebuglevel
implementation done for STM32F769-Disco with ESP socket and SDCARD socket
#define ESP_USART_RX_PORT GPIOD #define ESP_USART_RX_PIN LL_GPIO_PIN_2 #define ESP_USART_RX_PIN_AF LL_GPIO_AF_8 -#define ESP_USART_RS_PORT_CLK __HAL_RCC_GPIOD_CLK_ENABLE -#define ESP_USART_RS_PORT GPIOD -#define ESP_USART_RS_PIN LL_GPIO_PIN_2 +#define ESP_USART_RS_PORT_CLK __HAL_RCC_GPIOJ_CLK_ENABLE +#define ESP_USART_RS_PORT GPIOJ +#define ESP_USART_RS_PIN LL_GPIO_PIN_14 #define ESP_USART_DMA DMA1 #define ESP_USART_DMA_CLK __HAL_RCC_DMA1_CLK_ENABLE #define DMA_RX_STREAM_CLEAR_HT LL_DMA_ClearFlag_HT5(ESP_USART_DMA) #endif /* !defined(STM32F769_DISCOVERY) */ -#define USART_USE_DMA 1 +#define USART_USE_DMA 0 #if USART_USE_DMA static uint8_t usart_mem[0x400]; @@ -138,7 +138,13 @@ osThreadId usart_ll_thread_id; */ static uint16_t send_data(const void* data, uint16_t len) { - TM_USART_Send(ESP_USART, data, len); /* Send actual data via UART using blocking method */ + uint16_t i; + const uint8_t* d = data; + + for (i = 0; i < len; i++) { + LL_USART_TransmitData8(ESP_USART, *d++); + while (!LL_USART_IsActiveFlag_TXE(ESP_USART)); + } return len; } @@ -153,6 +159,11 @@ configure_uart(uint32_t baudrate) { LL_DMA_InitTypeDef dma_init; #endif /* USART_USE_DMA */ + if (initialized) { + osDelay(10); + return; + } + ESP_USART_CLK(); ESP_USART_TX_PORT_CLK(); ESP_USART_RX_PORT_CLK(); @@ -201,9 +212,6 @@ configure_uart(uint32_t baudrate) { LL_USART_Enable(ESP_USART); } - - - #if !USART_USE_DMA LL_USART_EnableIT_RXNE(ESP_USART); #endif /* USART_USE_DMA */
Code formatting changes and update if condition for empty delimiter
@@ -64,8 +64,7 @@ static Value formatString(VM *vm, int argCount, Value *args) { memcpy(tmp, string->chars, stringLen); int count = 0; - while((tmp = strstr(tmp, "{}"))) - { + while ((tmp = strstr(tmp, "{}"))) { count++; tmp++; } @@ -135,20 +134,17 @@ static Value splitString(VM *vm, int argCount, Value *args) { ObjList *list = initList(vm); push(vm, OBJ_VAL(list)); - if(!strlen(delimiter)) - { - for(int tokencount=0;tokencount<string->length;tokencount++) - { - *(tmp)=string->chars[tokencount]; + if (delimiterLength == 0) { + for (int tokenCount = 0; tokenCount < string->length; tokenCount++) { + *(tmp) = string->chars[tokenCount]; *(tmp + 1) = '\0'; - Value str = OBJ_VAL(copyString(vm, tmp, strlen(tmp))); + Value str = OBJ_VAL(copyString(vm, tmp, 1)); // Push to stack to avoid GC push(vm, str); writeValueArray(vm, &list->values, str); pop(vm); } - } -else{ + } else { do { token = strstr(tmp, delimiter); if (token) @@ -450,8 +446,7 @@ static Value countString(VM *vm, int argCount, Value *args) { char *needle = AS_CSTRING(args[1]); int count = 0; - while((haystack = strstr(haystack, needle))) - { + while ((haystack = strstr(haystack, needle))) { count++; haystack++; }
use standard variable name
START=95 USE_PROCD=1 -KADNODE_BIN=/usr/bin/kadnode +PROG=/usr/bin/kadnode OPTS="" @@ -56,14 +56,14 @@ start_instance() { append_opts_boolean "$cfg" dns_proxy_enable lpd_disable fwd_disable ipv4 ipv6 # Close stdin when cmd feature is present - if [ $($KADNODE_BIN --version | grep -c cmd) -eq 1 ]; then + if [ $($PROG --version | grep -c cmd) -eq 1 ]; then xappend "" "cmd_disable_stdin" fi echo "$OPTS" > $CONFIG_FILE procd_open_instance - procd_set_param command $KADNODE_BIN + procd_set_param command $PROG procd_set_param file $CONFIG_FILE procd_set_param stderr 1 procd_set_param stdout 1
/bsp/k210:add delay us function in board.c ,when using posix interface ,rt_hw_us_delay this function will be called in unistd.c file
/* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + *2021-06-10 xiaoyu implement rt_hw_us_delay() */ #include <rthw.h> @@ -117,3 +118,19 @@ void rt_hw_cpu_reset(void) } MSH_CMD_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reset machine); + +/** + * This function will delay for some us. + * + * @param us the delay time of us + */ +void rt_hw_us_delay(rt_uint32_t usec) +{ + rt_uint32_t cycle = read_cycle(); + rt_uint32_t nop_all = usec * sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 1000000UL; + while (1) + { + if(read_cycle() - cycle >= nop_all) + break; + } +}
travis: update location of setup-osx.sh
@@ -38,6 +38,6 @@ git: before_install: - git submodule update --init - gem update --system - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./vendor/libgit2/ci/setup-osx.sh; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./vendor/libgit2/azure-pipelines/setup-osx.sh; fi script: script/travisbuild
acrn-config: fix log macros for board defconfig fix macros log level for board defconfig. Acked-by: Victor Sun
@@ -203,10 +203,10 @@ def get_capacities(hv_info, config): def get_log_opt(hv_info, config): print("CONFIG_LOG_BUF_SIZE={}".format(hv_info.log.buf_size), file=config) - print("CONFIG_NPK_LOGLEVEL={}".format(hv_info.log.level.npk), file=config) - print("CONFIG_MEM_LOGLEVEL={}".format(hv_info.log.level.mem), file=config) + print("CONFIG_NPK_LOGLEVEL_DEFAULT={}".format(hv_info.log.level.npk), file=config) + print("CONFIG_MEM_LOGLEVEL_DEFAULT={}".format(hv_info.log.level.mem), file=config) print("CONFIG_LOG_DESTINATION={}".format(hv_info.log.dest), file=config) - print("CONFIG_CONSOLE_LOGLEVEL={}".format(hv_info.log.level.console), file=config) + print("CONFIG_CONSOLE_LOGLEVEL_DEFAULT={}".format(hv_info.log.level.console), file=config) def generate_file(hv_info, config):
Fix C++20 compatibility: Removed feature used The `std::allocator<T>` type in the C++ standard library does not declare the `const_pointer` associated type anymore, as per the update of the C++ standard. This fix replaces its usage with a normal constant pointer: ```diff typename std::allocator<void>::const_pointer +const std::allocator<void>::value_type * ```
@@ -268,7 +268,7 @@ struct allocator { inline pointer address(reference r) { return &r; } inline const_pointer address(const_reference r) { return &r; } - inline pointer allocate(size_type cnt, typename std::allocator<void>::const_pointer = 0) + inline pointer allocate(size_type cnt, const std::allocator<void>::value_type * = 0) { return reinterpret_cast<pointer>(cr_malloc(cnt * sizeof (T))); }
probot: good first issues are the only exception
@@ -12,10 +12,7 @@ onlyLabels: [] # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - - important - good first issue - - usability - - security # Set to true to ignore issues in a project (defaults to false) exemptProjects: false
I corrected a mismatched label in an IF - ENDIF block in the main CMakeLists file.
@@ -1270,7 +1270,7 @@ IF(VISIT_OSPRAY) THIRD_PARTY_INSTALL_LIBRARY(${l}) ENDIF() ENDFOREACH() - ENDIF(VISIT_OSPRAY_SKIP_INSTALL) + ENDIF(NOT VISIT_OSPRAY_SKIP_INSTALL) # debug MESSAGE(STATUS "OSPRAY_INCLUDE_DIR: " ${OSPRAY_INCLUDE_DIR})
Decrement firmware version.
* the IDE will Not connect if the major version number is different. */ #define FIRMWARE_VERSION_MAJOR (3) -#define FIRMWARE_VERSION_MINOR (5) -#define FIRMWARE_VERSION_PATCH (0) +#define FIRMWARE_VERSION_MINOR (4) +#define FIRMWARE_VERSION_PATCH (3) /** * To add a new debugging command, increment the last command value used.
posix: fix inet_accept behavior
@@ -102,17 +102,6 @@ int inet_accept(unsigned socket, struct sockaddr *address, socklen_t *address_le if ((err = socknamecall(socket, &msg, address, address_len)) < 0) return set_errno(err); - oid.port = err; - - if ((err = posix_newFile(p, 0)) < 0) { - msg.type = mtClose; - proc_send(oid.port, &msg); - return set_errno(err); - } - - p->fds[err].file->type = ftInetSocket; - hal_memcpy(&p->fds[err].file->oid, &oid, sizeof(oid)); - return err; }
API change calibration flags
@@ -1501,12 +1501,12 @@ int LMS7_Device::Calibrate(bool dir_tx, size_t chan, double bw, unsigned flags) lime::ReportError(EINVAL, "Invalid channel number."); return -1; } - lms->EnableCalibrationByMCU((flags&1) == 0); + //lms->EnableCalibrationByMCU((flags&1) == 0); lms->Modify_SPI_Reg_bits(LMS7param(MAC), (chan%2) + 1, true); if (dir_tx) - return lms->CalibrateTx(bw, false); + return lms->CalibrateTx(bw, flags & 1); else - return lms->CalibrateRx(bw, false); + return lms->CalibrateRx(bw, flags & 1); } int LMS7_Device::SetRxFrequency(size_t chan, double f_Hz)
[core] reset large path buffers from long URLs
@@ -184,6 +184,8 @@ request_reset_ex (request_st * const r) buffer_clear(&r->uri.authority); buffer_reset(&r->uri.path); buffer_reset(&r->uri.query); + buffer_reset(&r->physical.path); + buffer_reset(&r->physical.rel_path); buffer_reset(&r->target_orig); buffer_reset(&r->target); /*(see comments in request_reset())*/ buffer_reset(&r->pathinfo); /*(see comments in request_reset())*/
testing ESSID length only will fail on ESSID changes
@@ -346,7 +346,7 @@ for(hccapxzeiger1 = hccapxzeigerakt1; hccapxzeiger1 < (hccapx1list +hccapx1count hccapxzeigerakt1 = hccapxzeiger1; return true; } - if(hccapxzeiger1->essidlen > hccapxzeiger2->essidlen) + if(memcmp(hccapxzeiger2->essid, hccapxzeiger1->essid, ESSID_LEN_MAX) > 0) { return false; } @@ -363,7 +363,7 @@ for(hccapxzeiger2 = hccapx2list; hccapxzeiger2 < (hccapx2list +hccapx2count); hc hccapxzeigerakt2 = hccapxzeiger2; return true; } - if(hccapxzeiger2->essidlen > hccapxzeiger1->essidlen) + if(memcmp(hccapxzeiger1->essid, hccapxzeiger2->essid, ESSID_LEN_MAX) > 0) { return false; } @@ -719,7 +719,7 @@ for(pmkidzeiger1 = pmkidzeigerakt1; pmkidzeiger1 < (pmkid1list +pmkid1count); pm pmkidzeigerakt1 = pmkidzeiger1; return true; } - if(pmkidzeiger1->essidlen > pmkidzeiger2->essidlen) + if(memcmp(pmkidzeiger2->essid, pmkidzeiger1->essid, ESSID_LEN_MAX) > 0) { return false; } @@ -736,7 +736,7 @@ for(pmkidzeiger2 = pmkid2list; pmkidzeiger2 < (pmkid2list +pmkid2count); pmkidze pmkidzeigerakt2 = pmkidzeiger2; return true; } - if(pmkidzeiger2->essidlen > pmkidzeiger1->essidlen) + if(memcmp(pmkidzeiger1->essid, pmkidzeiger2->essid, ESSID_LEN_MAX) > 0) { return false; }
fix the dram low addr defined in the soc.h header
#define SOC_IROM_HIGH 0x40400000 #define SOC_DROM_LOW 0x3F400000 #define SOC_DROM_HIGH 0x3F800000 -#define SOC_DRAM_LOW 0x3FAE0000 +#define SOC_DRAM_LOW 0x3FFAE000 #define SOC_DRAM_HIGH 0x40000000 #define SOC_RTC_IRAM_LOW 0x400C0000 #define SOC_RTC_IRAM_HIGH 0x400C2000
fix: User-Agent dynamically inserts username
@@ -37,7 +37,11 @@ reddit_adapter_init(struct reddit_adapter *adapter, struct logconf *config) ua_easy_setopt(adapter->ua, adapter->p_client, &curl_setopt_cb); - ua_reqheader_add(adapter->ua, "User-Agent", "orca:github.com/cee-studio/orca:v.0 (by /u/LucasMull)"); + char auth[512]; + snprintf(auth, sizeof(auth), "orca:github.com/cee-studio/orca:v.0 (by /u/%.*s)", + (int)adapter->p_client->username.size, + adapter->p_client->username.start); + ua_reqheader_add(adapter->ua, "User-Agent", auth); ua_reqheader_add(adapter->ua, "Content-Type", "application/x-www-form-urlencoded"); }
Completions: Add suggestions for option `force`
@@ -106,6 +106,10 @@ function __fish_kdb_subcommand_supports_option_color -d 'Check if the current su __fish_kdb_subcommand_does_not_include complete help list-tools qt-gui end +function __fish_kdb_subcommand_supports_option_force -d 'Check if the current subcommand supports the option force' + __fish_kdb_subcommand_includes check merge +end + function __fish_kdb_subcommand_supports_option_null -d 'Check if the current subcommand supports binary null termination' __fish_kdb_subcommand_includes complete list list-commands ls lsmeta mount end @@ -143,6 +147,9 @@ set -l description 'Print never/auto(default)/always colored output' set -l completion_function '__fish_kdb_subcommand_supports_option_color' __fish_kdb_add_option "$completion_function" 'color' 'C' "$description" '(__fish_kdb_print_option_color_arguments)' -f +# --force -f +__fish_kdb_add_option '__fish_kdb_subcommand_supports_option_force' 'force' 'f' 'Force the action to be done' + # --help -H __fish_kdb_add_option '__fish_kdb_subcommand_supports_common_options' 'help' 'H' 'Show the man page'
Add instructions to install lcov for MacOS.
@@ -148,9 +148,10 @@ Vagrant.configure(2) do |config| # Basic environment to build/test pgBackRest using homebrew installed in the local user account. #------------------------------------------------------------------------------------------------------------------------------- # mkdir ~/homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C ~/homebrew - # ~/homebrew/bin/brew install -q libpq libxml2 cpanm + # ~/homebrew/bin/brew install -q libpq libxml2 cpanm lcov # ~/homebrew/bin/cpanm --force --local-lib=~/homebrew/perl5 install YAML::XS XML::Checker::Parser # + # export PATH="${HOME?}/homebrew/bin:$PATH" # export LDFLAGS="-L${HOME?}/homebrew/opt/[email protected]/lib -L${HOME?}/homebrew/opt/libpq/lib -L${HOME?}/homebrew/opt/libxml2/lib" # export CPPFLAGS="-I${HOME?}/homebrew/opt/[email protected]/include -I/${HOME?}/homebrew/opt/libpq/include" # export CPPFLAGS="${CPPFLAGS?} -I${HOME?}/homebrew/opt/libxml2/include/libxml2"
python3 eval_metrics bug fix
@@ -924,17 +924,20 @@ cdef class _CatBoost: stagedPredictIterator.set_model(self.__model) return stagedPredictIterator - cpdef _base_eval_metrics(self, _PoolBase pool, metrics_description, int ntree_start, int ntree_end, int eval_period, int thread_count, str result_dir, str tmp_dir): + cpdef _base_eval_metrics(self, _PoolBase pool, metric_descriptions, int ntree_start, int ntree_end, int eval_period, int thread_count, str result_dir, str tmp_dir): + result_dir = to_binary_str(result_dir) + tmp_dir = to_binary_str(tmp_dir) thread_count = UpdateThreadCount(thread_count); - cdef TVector[TString] metricsDescription - for metric_description in metrics_description: - metricsDescription.push_back(TString(<const char*>metric_description)) + cdef TVector[TString] metricDescriptions + for metric_description in metric_descriptions: + metric_description = to_binary_str(metric_description) + metricDescriptions.push_back(TString(<const char*>metric_description)) cdef TVector[TVector[double]] metrics metrics = EvalMetrics( dereference(self.__model), dereference(pool.__pool), - metricsDescription, + metricDescriptions, ntree_start, ntree_end, eval_period,
sysrepo BUGFIX check implemented modules revisions ... when installing a new module and do not allow updating an existing module this way. Fixes
@@ -960,10 +960,10 @@ sr_install_module(sr_conn_ctx_t *conn, const char *schema_path, const char *sear { sr_error_info_t *err_info = NULL; struct ly_ctx *tmp_ly_ctx = NULL; - const struct lys_module *ly_mod; + const struct lys_module *ly_mod, *ly_iter, *ly_iter2; LYS_INFORMAT format; char *mod_name = NULL; - int i; + uint32_t i; SR_CHECK_ARG_APIRET(!conn || !schema_path, NULL, err_info); @@ -1010,7 +1010,7 @@ sr_install_module(sr_conn_ctx_t *conn, const char *schema_path, const char *sear } /* enable all features to check their existence */ - for (i = 0; i < feat_count; ++i) { + for (i = 0; i < (unsigned)feat_count; ++i) { if (lys_features_enable(ly_mod, features[i])) { sr_errinfo_new(&err_info, SR_ERR_NOT_FOUND, NULL, "Module \"%s\" does not define feature \"%s\".", ly_mod->name, features[i]); @@ -1018,6 +1018,28 @@ sr_install_module(sr_conn_ctx_t *conn, const char *schema_path, const char *sear } } + /* check that the module does not implement some other modules in different revisions than already in the context */ + i = 0; + while ((ly_iter = ly_ctx_get_module_iter(tmp_ly_ctx, &i))) { + if (!ly_iter->implemented) { + continue; + } + + ly_iter2 = ly_ctx_get_module(conn->ly_ctx, ly_iter->name, NULL, 1); + if (!ly_iter2) { + continue; + } + + /* modules are implemented in both contexts, compare revisions */ + if ((!ly_iter->rev_size && ly_iter2->rev_size) || (ly_iter->rev_size && !ly_iter2->rev_size) + || (ly_iter->rev_size && ly_iter2->rev_size && strcmp(ly_iter->rev[0].date, ly_iter2->rev[0].date))) { + sr_errinfo_new(&err_info, SR_ERR_UNSUPPORTED, NULL, "Module \"%s\" implements module \"%s@%s\" that is already" + " in sysrepo in revision %s.", ly_mod->name, ly_iter->name, + ly_iter->rev_size ? ly_iter->rev[0].date : "<none>", ly_iter2->rev_size ? ly_iter2->rev[0].date : "<none>"); + goto cleanup_unlock; + } + } + /* schedule module installation */ if ((err_info = sr_lydmods_deferred_add_module(conn->ly_ctx, ly_mod, features, feat_count))) { goto cleanup_unlock;
rainier: final fix for accel orientation. Rainier has landscape orientation and last patch was 90 degrees off in its base rotation value. TEST=Flash ec on rainier and tilt device. BRANCH=None
@@ -352,8 +352,8 @@ static struct bmi160_drv_data_t g_bmi160_data; /* Matrix to rotate accelerometer into standard reference frame */ const matrix_3x3_t base_standard_ref = { - { 0, FLOAT_TO_FP(-1), 0}, - { FLOAT_TO_FP(1), 0, 0}, + { 0, FLOAT_TO_FP(1), 0}, + { FLOAT_TO_FP(-1), 0, 0}, { 0, 0, FLOAT_TO_FP(1)} };
hv: remove unnecessary debug symbols remove unnecessary debug symbols.
@@ -84,9 +84,7 @@ static void init_host_state(void) uint64_t gdt_base; uint64_t idt_base; - pr_dbg("*********************"); pr_dbg("Initialize host state"); - pr_dbg("*********************"); /*************************************************** * 16 - Bit fields @@ -241,9 +239,7 @@ static void init_exec_ctrl(struct acrn_vcpu *vcpu) struct acrn_vm *vm = vcpu->vm; /* Log messages to show initializing VMX execution controls */ - pr_dbg("*****************************"); pr_dbg("Initialize execution control "); - pr_dbg("*****************************"); /* Set up VM Execution control to enable Set VM-exits on external * interrupts preemption timer - pg 2899 24.6.1 @@ -437,9 +433,7 @@ static void init_entry_ctrl(const struct acrn_vcpu *vcpu) uint32_t value32; /* Log messages to show initializing VMX entry controls */ - pr_dbg("*************************"); pr_dbg("Initialize Entry control "); - pr_dbg("*************************"); /* Set up VMX entry controls - pg 2908 24.8.1 * Set IA32e guest mode - * on VM entry processor is in IA32e 64 bitmode * Start guest with host @@ -479,9 +473,7 @@ static void init_exit_ctrl(const struct acrn_vcpu *vcpu) uint32_t value32; /* Log messages to show initializing VMX entry controls */ - pr_dbg("************************"); pr_dbg("Initialize Exit control "); - pr_dbg("************************"); /* Set up VM exit controls - pg 2907 24.7.1 for: Host address space * size is 64 bit Set up to acknowledge interrupt on exit, if 1 the HW
Move certain targets so they build when tests are disabled
@@ -281,9 +281,6 @@ target_include_directories(picohttp-core picoquic) set_picoquic_compile_settings(picohttp-core) -include(CTest) - -if(BUILD_TESTING AND picoquic_BUILD_TESTS) add_executable(picoquicdemo picoquicfirst/picoquicdemo.c picoquicfirst/getopt.c) @@ -302,6 +299,10 @@ if(BUILD_TESTING AND picoquic_BUILD_TESTS) target_include_directories(picolog_t PRIVATE loglib) set_picoquic_compile_settings(picolog_t) +include(CTest) + +if(BUILD_TESTING AND picoquic_BUILD_TESTS) + add_library(picoquic-test STATIC ${PICOQUIC_TEST_LIBRARY_FILES}) target_link_libraries(picoquic-test PUBLIC picoquic-core picoquic-log) target_include_directories(picoquic-test
remove hoverer after focus change
@@ -1264,15 +1264,19 @@ drawbar(Monitor *m) } else { drw_setscheme(drw, scheme[SchemeNorm]); } - } if (drw->scheme != scheme[SchemeNorm]) { + if (i != selmon->gesture - 1) + { drw_text(drw, x, 0, w, bh, lrpad / 2, (showalttag ? tagsalt[i] : tags[i]), urg & 1 << i, 4); + } else { + drw_text(drw, x, 0, w, bh, lrpad / 2, (showalttag ? tagsalt[i] : tags[i]), urg & 1 << i, 8); + } } else { if (i == selmon->gesture - 1) { drw_setscheme(drw, scheme[SchemeHover]); - drw_text(drw, x, 0, w, bh, lrpad / 2, (showalttag ? tagsalt[i] : tags[i]), urg & 1 << i, 8); + drw_text(drw, x, 0, w, bh, lrpad / 2, (showalttag ? tagsalt[i] : tags[i]), urg & 1 << i, 2); }else { drw_text(drw, x, 0, w, bh, lrpad / 2, (showalttag ? tagsalt[i] : tags[i]), urg & 1 << i, 0); } @@ -1420,6 +1424,8 @@ focus(Client *c) XDeleteProperty(dpy, root, netatom[NetActiveWindow]); } selmon->sel = c; + if (selmon->gesture) + selmon->gesture = 0; drawbars(); if (!c){ if (!isdesktop) {
We don't need to push the default font
@@ -1062,7 +1062,6 @@ static void compute_swapchain_display(struct swapchain_data *data) ImGui::SetCurrentContext(data->imgui_context); ImGui::NewFrame(); position_layer(data); - ImGui::PushFont(font); if (instance_data->params.font_size > 0 && instance_data->params.width == 280) instance_data->params.width = hudFirstRow + hudSecondRow; @@ -1224,7 +1223,6 @@ static void compute_swapchain_display(struct swapchain_data *data) ImGui::End(); } ImGui::PopStyleVar(2); - ImGui::PopFont(); ImGui::EndFrame(); ImGui::Render();
[flang-340559] Another flang test case that works with code object v5. This update changes the Makefile to use code object v5
@@ -5,7 +5,7 @@ TESTSRC_AUX = main.f90 TESTSRC_MAIN = matrix.f90 TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX) -FLANG = flang -DUSE_GPU +FLANG = flang -DUSE_GPU -mcode-object-version=5 OMP_BIN = $(AOMP)/bin/$(FLANG) CC = $(OMP_BIN) $(VERBOSE)
Add PKEY_CTX setter tests for TLS1-PRF PKEY_CTX setters tests were previously present for HKDF and scrypt; this patch also adds tests for the third currently supported KDF, TLS1-PRF.
#include <openssl/kdf.h> #include "testutil.h" +static int test_kdf_tls1_prf(void) +{ + EVP_PKEY_CTX *pctx; + unsigned char out[16]; + size_t outlen = sizeof(out); + pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_TLS1_PRF, NULL); + + if (EVP_PKEY_derive_init(pctx) <= 0) { + TEST_error("EVP_PKEY_derive_init"); + return 0; + } + if (EVP_PKEY_CTX_set_tls1_prf_md(pctx, EVP_sha256()) <= 0) { + TEST_error("EVP_PKEY_CTX_set_tls1_prf_md"); + return 0; + } + if (EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, "secret", 6) <= 0) { + TEST_error("EVP_PKEY_CTX_set1_tls1_prf_secret"); + return 0; + } + if (EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, "seed", 4) <= 0) { + TEST_error("EVP_PKEY_CTX_add1_tls1_prf_seed"); + return 0; + } + if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { + TEST_error("EVP_PKEY_derive"); + return 0; + } + + { + const unsigned char expected[sizeof(out)] = { + 0x8e, 0x4d, 0x93, 0x25, 0x30, 0xd7, 0x65, 0xa0, + 0xaa, 0xe9, 0x74, 0xc3, 0x04, 0x73, 0x5e, 0xcc + }; + if (!TEST_mem_eq(out, sizeof(out), expected, sizeof(expected))) { + return 0; + } + } + EVP_PKEY_CTX_free(pctx); + return 1; +} + static int test_kdf_hkdf(void) { EVP_PKEY_CTX *pctx; @@ -131,6 +172,7 @@ static int test_kdf_scrypt(void) int setup_tests() { + ADD_TEST(test_kdf_tls1_prf); ADD_TEST(test_kdf_hkdf); #ifndef OPENSSL_NO_SCRYPT ADD_TEST(test_kdf_scrypt);
undo removing deprecated items
$Project: Schema File for Package Description File Format Specification Package file name convention <vendor>.<name>.<version>.pack - SchemaVersion=1.7.0 + SchemaVersion=1.7.1 + + 08. November 2020: v1.7.1 + - undo removing deprecated attributes as they are still used in latest pdsc file versions: + DeviceVendorEnum: Lapis Semiconductor, DeviceVendorEnum: Pname, BoardReferenceType: Dvendor, Dname 14. September 2020: v1.7.0 - added processor attribute Dcdecp for implemented Custom Datapath Extension Coprocessors (Cortex-M33) <xs:enumeration value="Infineon:7" /> <xs:enumeration value="Kionix:127" /> <xs:enumeration value="LAPIS Technology:10" /> + <xs:enumeration value="Lapis Semiconductor:10" /> <xs:enumeration value="Linear Technology:136" /> <xs:enumeration value="Luminary Micro:76" /> <xs:enumeration value="Maxim:23" /> <xs:attribute name="Dmve" type="DmveEnum" /> <xs:attribute name="Dsecure" type="DsecureEnum" /> <xs:attribute name="Dendian" type="DendianEnum" /> + <xs:attribute name="Pname" type="RestrictedString" /> <xs:attribute name="Cvendor" type="xs:string" /> <xs:attribute name="Cbundle" type="xs:string" /> <xs:attribute name="Cclass" type="CclassType" /> <xs:attribute name="name" type="xs:string" use="required" /> <!-- refers to Board Description by name --> <xs:attribute name="vendor" type="xs:string" use="required" /> <!-- refers to Board Description by vendor --> <xs:attribute name="revision" type="xs:string" use="optional" /> <!-- refers to Board Description by board revision --> + <xs:attribute name="Dvendor" type="DeviceVendorEnum" use="optional"/> <!-- deprecated in 1.2 --> + <xs:attribute name="Dname" type="xs:string" use="optional"/> <!-- deprecated in 1.2 --> </xs:complexType> <xs:complexType name="CompatibleDeviceType">