message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
process.c: fixed array index checking | @@ -603,7 +603,7 @@ int process_load(process_t *process, vm_object_t *o, offs_t base, size_t size, v
paddr = (char *)ehdr + phdr->p_offset;
}
- if (j > sizeof(reloc) / sizeof(reloc[0]))
+ if (j >= sizeof(reloc) / sizeof(reloc[0]))
return -ENOMEM;
reloc[j].vbase = (void *)phdr->p_vaddr;
|
fix storage_test compiler warning | @@ -21,6 +21,10 @@ static void main_handler(void *arg)
log_info("num blocks: %lu", storage_num_blocks());
log_info("block size: %u", block_size);
log_info("writing 'hello world' to device...");
+ if (block_size == 0) {
+ log_info("storage support is disabled, skipping test");
+ return;
+ }
buf = malloc(block_size);
BUG_ON(!buf);
sprintf(buf, "hello world");
|
Fix regression escaping empty columns from commit | * Authors:
*
* wj32 2010-2012
- * dmex 2018-2020
+ * dmex 2018-2023
*
*/
@@ -30,6 +30,7 @@ VOID PhpEscapeStringForCsv(
length = String->Length / sizeof(WCHAR);
runStart = NULL;
+ runLength = 0;
for (i = 0; i < length; i++)
{
@@ -326,12 +327,13 @@ PPH_STRING PhGetTreeNewText(
PhInitializeEmptyStringRef(&getCellText.Text);
TreeNew_GetCellText(TreeNewHandle, &getCellText);
- // Ignore empty columns. -dmex
+ // Ignore empty columns. (dmex)
if (getCellText.Text.Length != 0)
{
PhAppendStringBuilder(&stringBuilder, &getCellText.Text);
- PhAppendStringBuilder2(&stringBuilder, L", ");
}
+
+ PhAppendStringBuilder2(&stringBuilder, L", ");
}
// Remove the trailing comma and space.
|
core: feed resolvers a handle to keyset with file modification times
Resolvers can use the handle to put file modification times into a keyset. This is then compared with the cached modification times, to check whether the cache needs to be rebuilt. | @@ -456,7 +456,7 @@ int kdbClose (KDB * handle, Key * errorKey)
* @retval 0 no update needed
* @retval number of plugins which need update
*/
-static int elektraGetCheckUpdateNeeded (Split * split, Key * parentKey)
+static int elektraGetCheckUpdateNeeded (Split * split, Key * parentKey, KeySet * modTimes)
{
int updateNeededOccurred = 0;
for (size_t i = 0; i < split->size; i++)
@@ -465,13 +465,16 @@ static int elektraGetCheckUpdateNeeded (Split * split, Key * parentKey)
Backend * backend = split->handles[i];
clear_bit (split->syncbits[i], 1);
- if (backend->getplugins[RESOLVER_PLUGIN] && backend->getplugins[RESOLVER_PLUGIN]->kdbGet)
+ Plugin * resolver = backend->getplugins[RESOLVER_PLUGIN];
+ if (resolver && resolver->kdbGet)
{
ksRewind (split->keysets[i]);
keySetName (parentKey, keyName (split->parents[i]));
keySetString (parentKey, "");
- ret = backend->getplugins[RESOLVER_PLUGIN]->kdbGet (backend->getplugins[RESOLVER_PLUGIN], split->keysets[i],
+ resolver->globalData = modTimes;
+ ret = resolver->kdbGet (resolver, split->keysets[i],
parentKey);
+ resolver->globalData = 0;
// store resolved filename
keySetString (split->parents[i], keyString (parentKey));
// no keys in that backend
@@ -834,8 +837,10 @@ int kdbGet (KDB * handle, KeySet * ks, Key * parentKey)
goto error;
}
+ KeySet * modTimes = ksNew (0, KS_END);
+
// Check if a update is needed at all
- switch (elektraGetCheckUpdateNeeded (split, parentKey))
+ switch (elektraGetCheckUpdateNeeded (split, parentKey, modTimes))
{
case 0: // We don't need an update so let's do nothing
|
missing PMTT is not an error | @@ -4390,8 +4390,10 @@ initAcpiTables(
Find the Differentiated System Description Table (DSDT) from EFI_SYSTEM_TABLE
**/
ReturnCode = GetAcpiTables(gST, &pNfit, &pPcat, &pPMTT);
- if (EFI_ERROR(ReturnCode)) {
- NVDIMM_WARN("Failed to get NFIT or PCAT or PMTT table.");
+ // The PMTT is optional, in that case the pointer stays NULL, it is not an ERROR condition
+ if (((EFI_LOAD_ERROR != ReturnCode) && (EFI_SUCCESS != ReturnCode)) ||
+ ((EFI_LOAD_ERROR == ReturnCode) && (NULL != pPMTT))) {
+ NVDIMM_WARN("Failed to get NFIT or PCAT table.");
goto Finish;
}
|
Add struct for gpu color change data | @@ -927,6 +927,17 @@ int change_on_load_temp (int info, int high, int med) {
}
}
+
+struct LOAD_DATA {
+ ImVec4 color_high;
+ ImVec4 color_med;
+ ImVec4 color_low;
+ unsigned high_load;
+ unsigned med_load;
+};
+
+
+
void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, bool is_vulkan)
{
ImGui::GetIO().FontGlobalScale = params.font_scale;
@@ -966,6 +977,13 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2&
auto text_color = data.colors.text;
if (params.enabled[OVERLAY_PARAM_ENABLED_gpu_load_change]){
auto load_color = data.colors.text;
+ struct LOAD_DATA gpu_data = {data.colors.gpu_load_high,
+ data.colors.gpu_load_med,
+ data.colors.gpu_load_low,
+ params.gpu_load_value[0],
+ params.gpu_load_value[1]
+ };
+
int gpu_load = change_on_load_temp(gpu_info.load, params.gpu_load_value[0], params.gpu_load_value[1]);
// 1 is high, 2 is medium, and 3 is low load/temp
switch (gpu_load) {
|
fixed missing break statement in py_net_search. | @@ -206,16 +206,19 @@ STATIC mp_obj_t py_net_search(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar
int pixel = COLOR_BINARY_TO_GRAYSCALE(IMAGE_GET_BINARY_PIXEL(arg_img, a, b));
sum += pixel;
sum_2 += pixel * pixel;
+ break;
}
case IMAGE_BPP_GRAYSCALE: {
int pixel = IMAGE_GET_GRAYSCALE_PIXEL(arg_img, a, b);
sum += pixel;
sum_2 += pixel * pixel;
+ break;
}
case IMAGE_BPP_RGB565: {
int pixel = COLOR_RGB565_TO_GRAYSCALE(IMAGE_GET_RGB565_PIXEL(arg_img, a, b));
sum += pixel;
sum_2 += pixel * pixel;
+ break;
}
}
}
|
Fix showing swversion of DDF devices in Node List | @@ -671,11 +671,12 @@ void DEV_PublishToCore(Device *device)
const char *mapped;
};
- std::array<CoreItem, 3> coreItems = {
+ std::array<CoreItem, 4> coreItems = {
{
{ RAttrName, "name" },
{ RAttrModelId, "modelid" },
- { RAttrManufacturerName, "vendor" }
+ { RAttrManufacturerName, "vendor" },
+ { RAttrSwVersion, "version" }
}
};
@@ -771,6 +772,10 @@ void DEV_IdleStateHandler(Device *device, const Event &event)
else if (event.what() != RAttrLastSeen && event.what() != REventPoll)
{
// DBG_Printf(DBG_DEV, "DEV Idle event %s/0x%016llX/%s\n", event.resource(), event.deviceKey(), event.what());
+ if (event.what() == RAttrSwVersion || event.what() == RAttrName)
+ {
+ DEV_PublishToCore(device);
+ }
}
if (!device->reachable() && !device->item(RAttrSleeper)->toBool())
|
Fix minor typo in nodeIncrementalSort.c.
Author: Vignesh C
Backpatch-through: 13, where it was introduced
Discussion: | * into the second mode if we believe it's beneficial.
*
* Sorting incrementally can potentially use less memory, avoid fetching
- * and sorting all tuples in the the dataset, and begin returning tuples
- * before the entire result set is available.
+ * and sorting all tuples in the dataset, and begin returning tuples before
+ * the entire result set is available.
*
* The hybrid mode approach allows us to optimize for both very small
* groups (where the overhead of a new tuplesort is high) and very large
|
Add BUILD_SINGLE etc | @@ -277,5 +277,10 @@ COMMON_PROF = -pg
# If you want to enable the experimental BFLOAT16 support
# BUILD_HALF = 1
#
+# the below is not yet configurable, use cmake if you need to build only select types
+BUILD_SINGLE = 1
+BUILD_DOUBLE = 1
+BUILD_COMPLEX = 1
+BUILD_COMPLEX16 = 1
# End of user configuration
#
|
apps/system/poweroff: add a dependancy with BOARDCTL_POWEROFF
Poweroff application can be enabled when board supports poweroff functionality.
This commit fixs below:
/os/../build/output/libraries/libapps.a(poweroff.o): In function `poweroff_main':
/apps/system/poweroff/poweroff.c:68: undefined reference to `board_power_off' | config SYSTEM_POWEROFF
bool "Power-Off command"
default n
+ depends on BOARDCTL_POWEROFF
---help---
Enable support for the TASH poweroff command. NOTE: This option
provides the TASH power-off command only. It requires board-specific
|
Make the c_compiler variables private
As always in life, it's better to make things private by default | @@ -16,12 +16,12 @@ local util = require "pallene.util"
local c_compiler = {}
-c_compiler.CC = "cc"
-c_compiler.CPPFLAGS = "-I./vm/src"
-c_compiler.CFLAGS_BASE = "-std=c99 -g -fPIC"
-c_compiler.CFLAGS_WARN = "-Wall -Wundef -Wpedantic -Wno-unused"
-c_compiler.S_FLAGS = "-fverbose-asm"
-c_compiler.USER_CFlAGS = os.getenv("CFLAGS") or ""
+local CC = "cc"
+local CPPFLAGS = "-I./vm/src"
+local CFLAGS_BASE = "-std=c99 -g -fPIC"
+local CFLAGS_WARN = "-Wall -Wundef -Wpedantic -Wno-unused"
+local S_FLAGS = "-fverbose-asm"
+local USER_CFlAGS = os.getenv("CFLAGS") or ""
local function get_uname()
local ok, err, uname = util.outputs_of_execute("uname -s")
@@ -29,14 +29,15 @@ local function get_uname()
return uname
end
+local CFLAGS_SHARED
if string.find(get_uname(), "Darwin") then
- c_compiler.CFLAGS_SHARED = "-shared -undefined dynamic_lookup"
+ CFLAGS_SHARED = "-shared -undefined dynamic_lookup"
else
- c_compiler.CFLAGS_SHARED = "-shared"
+ CFLAGS_SHARED = "-shared"
end
local function run_cc(args)
- local cmd = c_compiler.CC .. " " .. table.concat(args, " ")
+ local cmd = CC .. " " .. table.concat(args, " ")
local ok = util.execute(cmd)
if not ok then
return false, {
@@ -50,12 +51,12 @@ end
-- The third argument is the mod_name, which is not used by c_compiler.compile_c_to_s
function c_compiler.compile_c_to_s(in_filename, out_filename, _, opt_level)
return run_cc({
- c_compiler.CPPFLAGS,
- c_compiler.CFLAGS_BASE,
- c_compiler.CFLAGS_WARN,
- c_compiler.S_FLAGS,
+ CPPFLAGS,
+ CFLAGS_BASE,
+ CFLAGS_WARN,
+ S_FLAGS,
opt_level and "-O"..opt_level or "",
- c_compiler.USER_CFlAGS,
+ USER_CFlAGS,
"-x c",
"-o", util.shell_quote(out_filename),
"-S", util.shell_quote(in_filename),
@@ -75,7 +76,7 @@ function c_compiler.compile_o_to_so(in_filename, out_filename)
-- There is no need to add the '-x' flag when compiling an object file without a '.o' extension.
-- According to GCC, any file name with no recognized suffix is treated as an object file.
return run_cc({
- c_compiler.CFLAGS_SHARED,
+ CFLAGS_SHARED,
"-o", util.shell_quote(out_filename),
util.shell_quote(in_filename),
})
|
Adding deliberate ASAN violation for testing script | @@ -105,6 +105,11 @@ picoquic_alpn_enum picoquic_parse_alpn_nz(char const* alpn, size_t len)
code = alpn_list[i].alpn_code;
break;
}
+#if 1
+ /* Deliberate access violation, to test ASAN reports */
+ int x = alpn_list[i].alpn_val[64];
+ DBG_PRINTF("ASAN should block this, x=0x%02x", x);
+#endif
}
}
|
[toolchain] Add Makefile targets for GCC and LLVM toolchains | @@ -3,26 +3,23 @@ SHELL = bash
INSTALL_PREFIX ?= install
INSTALL_DIR ?= ${ROOT_DIR}/${INSTALL_PREFIX}
-LLVM_INSTALL_DIR ?= ${INSTALL_DIR}/llvm
-HALIDE_INSTALL_DIR ?= ${INSTALL_DIR}/halide
-GCC_INSTALL_DIR ?= ${INSTALL_DIR}/riscv-gcc
-CMAKE ?= cmake
-CC ?= gcc
-CXX ?= g++
+CMAKE ?= cmake-3.7.1
+CC ?= gcc-8.2.0
+CXX ?= g++-8.2.0
# Toolchain
-.PHONY: riscv-gcc llvm
+.PHONY: tc-riscv-gcc tc-llvm
-riscv-gcc:
- mkdir -p ${GCC_INSTALL_DIR}
- cd $(CURDIR)/toolchain/riscv-gnu-toolchain && git submodule update --init --recursive && ./configure --prefix=${GCC_INSTALL_DIR} --enable-multilib && $(MAKE)
+tc-riscv-gcc:
+ mkdir -p ${INSTALL_DIR}
+ cd $(CURDIR)/toolchain/riscv-gnu-toolchain && git submodule update --init --recursive && ./configure --prefix=${INSTALL_DIR} --with-arch=rv32im --with-cmodel=medlow --enable-multilib && $(MAKE) -j4
-llvm:
- mkdir -p ${LLVM_INSTALL_DIR}
+tc-llvm:
+ mkdir -p ${INSTALL_DIR}
cd $(CURDIR)/toolchain/llvm-project && mkdir -p build && cd build; pwd; \
$(CMAKE) \
- -DCMAKE_INSTALL_PREFIX=$(LLVM_INSTALL_DIR) \
+ -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) \
-DCMAKE_CXX_COMPILER=$(CXX) \
-DCMAKE_C_COMPILER=$(CC) \
-DLLVM_ENABLE_PROJECTS="clang" \
@@ -32,10 +29,9 @@ llvm:
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=Release \
../llvm && \
- make -j7 all && \
+ make -j4 all && \
make install
-
# Helper targets
.PHONY: clean
|
fix invalid value of rec_config for media_framework
Did not specify the period_size and period_count values of rec_config,
and an error caused by the garbage value occured. | @@ -142,6 +142,9 @@ record_result_t media_record_set_config(int channel, int sample_rate, int pcm_fo
g_rc.rec_config->channels = channel;
g_rc.rec_config->rate = sample_rate;
g_rc.rec_config->format = pcm_format;
+ //TO-DO we should discussion for default value or user value and then will change.
+ g_rc.rec_config->period_size = 0;
+ g_rc.rec_config->period_count = 0;
g_rc.format = format;
RECORD_UNLOCK();
|
Fix snprintf() format specifiers for unsigned value | @@ -5171,7 +5171,7 @@ Image_deskew(int argc, VALUE *argv, VALUE self)
case 2:
width = NUM2ULONG(argv[1]);
memset(auto_crop_width, 0, sizeof(auto_crop_width));
- snprintf(auto_crop_width, sizeof(auto_crop_width), "%ld", width);
+ snprintf(auto_crop_width, sizeof(auto_crop_width), "%lu", width);
SetImageArtifact(image, "deskew:auto-crop", auto_crop_width);
case 1:
threshold = rm_percentage(argv[0],1.0) * QuantumRange;
@@ -14477,7 +14477,7 @@ thumbnail(int bang, int argc, VALUE *argv, VALUE self)
break;
}
- snprintf(image_geometry, sizeof(image_geometry), "%ldx%ld", columns, rows);
+ snprintf(image_geometry, sizeof(image_geometry), "%lux%lu", columns, rows);
exception = AcquireExceptionInfo();
(void) ParseRegionGeometry(image, image_geometry, &geometry, exception);
|
Avoid __GNUC__ warnings when defining DECLARE_DEPRECATED
We need to check that __GNUC__ is defined before trying to use it.
This demands a slightly different way to define DECLARE_DEPRECATED. | @@ -68,10 +68,12 @@ extern "C" {
* still won't see them if the library has been built to disable deprecated
* functions.
*/
+#define DECLARE_DEPRECATED(f) f;
+#ifdef __GNUC__
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
+# undef DECLARE_DEPRECATED
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
-#else
-# define DECLARE_DEPRECATED(f) f;
+# endif
#endif
#ifndef OPENSSL_FILE
|
Fix issue with change provider button not triggering modal | @@ -8,6 +8,7 @@ const Settings = () => {
const changeProvider = () => {
api.btcWalletCommand({ 'set-provider': null });
+ window.location.reload();
};
const replaceWallet = () => {
|
cmake: xerces fix include libraries | @@ -86,7 +86,7 @@ if(NOT XercesC_LIBRARY)
find_library(XercesC_LIBRARY_DEBUG
NAMES "xerces-cd" "xerces-c_3D" "xerces-c_3_1D"
DOC "Xerces-C++ libraries (debug)")
- include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ include(SelectLibraryConfigurations)
select_library_configurations(XercesC)
mark_as_advanced(XercesC_LIBRARY_RELEASE XercesC_LIBRARY_DEBUG)
endif()
@@ -95,7 +95,7 @@ if(XercesC_INCLUDE_DIR)
_XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp")
endif()
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC
FOUND_VAR XercesC_FOUND
REQUIRED_VARS XercesC_LIBRARY
|
iokernel: add compile-time flag to disable hyperthreads | #include "defs.h"
+/*#define CORES_NOHT 1*/
+
unsigned int nr_avail_cores = 0;
DEFINE_BITMAP(avail_cores, NCPU);
struct core_assignments core_assign;
@@ -336,6 +338,7 @@ static int pick_core_for_proc(struct proc *p)
struct thread *t;
struct proc *buddy_proc, *core_proc;
+#ifndef CORES_NOHT
/* try to allocate a hyperthread pair core */
for (i = 0; i < p->active_thread_count; i++) {
t = p->active_threads[i];
@@ -351,6 +354,7 @@ static int pick_core_for_proc(struct proc *p)
if (buddy_proc != p && proc_is_bursting(buddy_proc))
return buddy_core;
}
+#endif
/* try the core that we most recently ran on */
t = list_top(&p->idle_threads, struct thread, idle_link);
@@ -416,6 +420,7 @@ static struct thread *pick_thread_for_core(int core)
goto chose_proc;
}
+#ifndef CORES_NOHT
/* try to allocate to the process running on the hyperthread pair core */
buddy_core = cpu_to_sibling_cpu(core);
if (core_history[buddy_core].current) {
@@ -423,6 +428,7 @@ static struct thread *pick_thread_for_core(int core)
if (!p->removed && proc_is_overloaded(p))
goto chose_proc;
}
+#endif
/* try to allocate to the process that used this core previously */
if (core_history[core].prev) {
@@ -753,6 +759,14 @@ int cores_init(void)
continue;
}
+#ifdef CORES_NOHT
+ /* disable hyperthreads */
+ j = bitmap_find_next_set(cpu_info_tbl[i].thread_siblings_mask,
+ cpu_count, 0);
+ if (i != j)
+ continue;
+#endif
+
if (cpu_info_tbl[i].package == 0)
core_init(i);
}
|
[ZARCH] Restore detect() function | @@ -45,9 +45,29 @@ static char *cpuname_lower[] = {
int detect(void)
{
- // return CPU_GENERIC;
- return CPU_Z14;
+ FILE *infile;
+ char buffer[512], *p;
+ p = (char *)NULL;
+ infile = fopen("/proc/sysinfo", "r");
+ while (fgets(buffer, sizeof(buffer), infile)){
+ if (!strncmp("Type", buffer, 4)){
+ p = strchr(buffer, ':') + 2;
+#if 0
+ fprintf(stderr, "%s\n", p);
+#endif
+ break;
+ }
+ }
+
+ fclose(infile);
+
+ if (strstr(p, "2964")) return CPU_Z13;
+ if (strstr(p, "2965")) return CPU_Z13;
+ if (strstr(p, "3906")) return CPU_Z14;
+ if (strstr(p, "3907")) return CPU_Z14;
+
+ return CPU_GENERIC;
}
void get_libname(void)
|
Fix evaluation of overlapping sets of features; log additionally ignored features | @@ -552,14 +552,14 @@ static TVector<TTrainingDataProviders> UpdateIgnoredFeaturesInLearn(
if (featureEvalMode == NCB::EFeatureEvalMode::OthersVsAll) {
ignoredFeatures = testedFeatures[testedFeatureSetIdx];
} else {
- for (ui32 featureSetIdx : xrange(testedFeatures.size())) {
- if (featureSetIdx != testedFeatureSetIdx) {
- ignoredFeatures.insert(
- ignoredFeatures.end(),
- testedFeatures[featureSetIdx].begin(),
- testedFeatures[featureSetIdx].end());
+ THashSet<ui32> ignoredFeaturesAsSet;
+ for (const auto& featureSet : testedFeatures) {
+ ignoredFeaturesAsSet.insert(featureSet.begin(), featureSet.end());
}
+ for (ui32 featureIdx : testedFeatures[testedFeatureSetIdx]) {
+ ignoredFeaturesAsSet.erase(featureIdx);
}
+ ignoredFeatures.insert(ignoredFeatures.end(), ignoredFeaturesAsSet.begin(), ignoredFeaturesAsSet.end());
}
} else if (EqualToOneOf(featureEvalMode, NCB::EFeatureEvalMode::OneVsAll, NCB::EFeatureEvalMode::OthersVsAll)) {
// no additional ignored features
@@ -577,6 +577,22 @@ static TVector<TTrainingDataProviders> UpdateIgnoredFeaturesInLearn(
featureSet.end());
}
}
+
+ TStringBuilder logMessage;
+ logMessage << "Feature set " << testedFeatureSetIdx;
+ if (trainingKind == ETrainingKind::Baseline) {
+ logMessage << ", baseline";
+ } else {
+ logMessage << ", testing";
+ }
+ if (ignoredFeatures.empty()) {
+ logMessage << ", no additional ignored features";
+ } else {
+ std::sort(ignoredFeatures.begin(), ignoredFeatures.end());
+ logMessage << ", additional ignored features " << JoinRange(":", ignoredFeatures.begin(), ignoredFeatures.end());
+ }
+ CATBOOST_INFO_LOG << logMessage << Endl;
+
TVector<TTrainingDataProviders> result;
result.reserve(foldsData.size());
if (taskType == ETaskType::CPU) {
|
Turned off fscanf. It caused a crash in mongod. If we want to turn it back on, will need to determine how many fargs are needed? | @@ -4312,7 +4312,7 @@ fputwc(wchar_t wc, FILE *stream)
IOSTREAMPOST(fputwc, 1, WEOF, (enum event_type_t)EVENT_FS);
}
-EXPORTON int
+EXPORTOFF int
fscanf(FILE *stream, const char *format, ...)
{
struct FuncArgs fArgs;
|
Corrects outstanding documentation issues
Commit removes any remaining superfluous
documentation that was not yet removed. | @@ -573,10 +573,6 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx,
* It is the generic wrapper for performing a PKCS#1 encryption
* operation.
*
- * \note Alternative implementations of RSA need not support
- * mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
- *
* \param ctx The initialized RSA context to use.
* \param f_rng The RNG to use. It is mandatory for PKCS#1 v2.1 padding
* encoding, and for PKCS#1 v1.5 padding encoding.
@@ -605,10 +601,6 @@ int mbedtls_rsa_pkcs1_encrypt( mbedtls_rsa_context *ctx,
* \brief This function performs a PKCS#1 v1.5 encryption operation
* (RSAES-PKCS1-v1_5-ENCRYPT).
*
- * \note Alternative implementations of RSA need not support
- * mode being set to #MBEDTLS_RSA_PRIVATE and might instead
- * return #MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED.
- *
* \param ctx The initialized RSA context to use.
* \param f_rng The RNG function to use. It is needed for padding generation.
* \param p_rng The RNG context to be passed to \p f_rng. This may
|
l2: fix vrrp prefix mac comparison
VRRP prefix length is 5 bytes, doesn't make sense
to compare with 6 bytes mac address
Type: fix | @@ -332,8 +332,8 @@ arp_term_l2bd (vlib_main_t * vm,
|| ethernet_address_cast (arp0->ip4_over_ethernet[0].mac.bytes))
{
/* VRRP virtual MAC may be different to SMAC in ARP reply */
- if (!ethernet_mac_address_equal
- (arp0->ip4_over_ethernet[0].mac.bytes, vrrp_prefix))
+ if (clib_memcmp (arp0->ip4_over_ethernet[0].mac.bytes,
+ vrrp_prefix, sizeof (vrrp_prefix)) != 0)
{
error0 = ETHERNET_ARP_ERROR_l2_address_mismatch;
goto drop;
|
simd128: add some implementations of convert functions | @@ -6562,7 +6562,18 @@ simde_wasm_f32x4_convert_i32x4 (simde_v128_t a) {
a_ = simde_v128_to_private(a),
r_;
- #if defined(SIMDE_CONVERT_VECTOR_)
+ #if defined(SIMDE_X86_SSE2_NATIVE)
+ r_.sse_m128 = _mm_cvtepi32_ps(a_.sse_m128i);
+ #elif defined(SIMDE_ARM_NEON_A32V7)
+ r_.neon_f32 = vcvtq_f32_s32(a_.neon_i32);
+ #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
+ HEDLEY_DIAGNOSTIC_PUSH
+ #if HEDLEY_HAS_WARNING("-Wc11-extensions")
+ #pragma clang diagnostic ignored "-Wc11-extensions"
+ #endif
+ r_.altivec_f32 = vec_ctf(a_.altivec_i32, 0);
+ HEDLEY_DIAGNOSTIC_POP
+ #elif defined(SIMDE_CONVERT_VECTOR_)
SIMDE_CONVERT_VECTOR_(r_.f32, a_.i32);
#else
SIMDE_VECTORIZE
@@ -6614,10 +6625,14 @@ simde_wasm_f64x2_convert_low_i32x4 (simde_v128_t a) {
a_ = simde_v128_to_private(a),
r_;
+ #if HEDLEY_HAS_BUILTIN(__builtin_shufflevector) && HEDLEY_HAS_BUILTIN(__builtin_convertvector)
+ r_.f64 = __builtin_convertvector(__builtin_shufflevector(a_.i32, a_.i32, 0, 1), __typeof__(r_.f64));
+ #else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.f64) / sizeof(r_.f64[0])) ; i++) {
r_.f64[i] = HEDLEY_STATIC_CAST(simde_float64, a_.i32[i]);
}
+ #endif
return simde_v128_from_private(r_);
#endif
@@ -6636,10 +6651,14 @@ simde_wasm_f64x2_convert_low_u32x4 (simde_v128_t a) {
a_ = simde_v128_to_private(a),
r_;
+ #if HEDLEY_HAS_BUILTIN(__builtin_shufflevector) && HEDLEY_HAS_BUILTIN(__builtin_convertvector)
+ r_.f64 = __builtin_convertvector(__builtin_shufflevector(a_.u32, a_.u32, 0, 1), __typeof__(r_.f64));
+ #else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.f64) / sizeof(r_.f64[0])) ; i++) {
r_.f64[i] = HEDLEY_STATIC_CAST(simde_float64, a_.u32[i]);
}
+ #endif
return simde_v128_from_private(r_);
#endif
|
update windows shell check url to azure cache due to deprecation | @@ -16,7 +16,7 @@ Param(
[string]$Clang7Hash = '672E4C420D6543A8A9F8EC5F1E5F283D88AC2155EF4C57232A399160A02BFF57',
[string]$IntelPSWURL = 'http://registrationcenter-download.intel.com/akdlm/IRC_NAS/16766/Intel%20SGX%20PSW%20for%20Windows%20v2.8.100.2.exe',
[string]$IntelPSWHash = '02E5A3E376B450A502F7D79B79A0CCFBCAFA1AFBF15FB7EA6C8830020928D68A',
- [string]$ShellCheckURL = 'https://shellcheck.storage.googleapis.com/shellcheck-v0.7.0.zip',
+ [string]$ShellCheckURL = 'https://oejenkins.blob.core.windows.net/oejenkins/shellcheck-v0.7.0.zip',
[string]$ShellCheckHash = '02CFA14220C8154BB7C97909E80E74D3A7FE2CBB7D80AC32ADCAC7988A95E387',
[string]$NugetURL = 'https://www.nuget.org/api/v2/package/NuGet.exe/3.4.3',
[string]$NugetHash = '2D4D38666E5C7D27EE487C60C9637BD9DD63795A117F0E0EDC68C55EE6DFB71F',
|
framework/media: Fix a bulid warning in MediaUtils
Change from int to unsigned int. | @@ -357,7 +357,7 @@ bool header_parsing(FILE *fp, audio_type_t audioType, unsigned int *channel, uns
bool header_parsing(unsigned char *buffer, unsigned int bufferSize, audio_type_t audioType, unsigned int *channel, unsigned int *sampleRate, audio_format_type_t *pcmFormat)
{
- int headPoint;
+ unsigned int headPoint;
unsigned char *header;
bool isHeader;
switch (audioType) {
|
freertos: Fix CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY description
This commit fixes the ambiguity in the description of the
SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY configuration option. | @@ -208,10 +208,11 @@ menu "ESP32-specific"
help
Because some bits of the ESP32 code environment cannot be recompiled with the cache workaround,
normally tasks cannot be safely run with their stack residing in external memory; for this reason
- xTaskCreate and friends always allocate stack in internal memory and xTaskCreateStatic will check if
- the memory passed to it is in internal memory. If you have a task that needs a large amount of stack
- and does not call on ROM code in any way (no direct calls, but also no Bluetooth/WiFi), you can try to
- disable this and use xTaskCreateStatic to create the tasks stack in external memory.
+ xTaskCreate (and related task creaton functions) always allocate stack in internal memory and
+ xTaskCreateStatic will check if the memory passed to it is in internal memory. If you have a task that
+ needs a large amount of stack and does not call on ROM code in any way (no direct calls, but also no
+ Bluetooth/WiFi), you can try enable this to cause xTaskCreateStatic to allow tasks stack in external
+ memory.
choice SPIRAM_OCCUPY_SPI_HOST
prompt "SPI host to use for 32MBit PSRAM"
|
channel-js: ensure lastEventId is an integer, and correctly set lastAckedEvent | @@ -203,7 +203,7 @@ class Channel {
//
let payload = [
...this.outstandingJSON,
- {action: "ack", "event-id": parseInt(this.lastEventId)}
+ {action: "ack", "event-id": this.lastEventId}
];
if (j) {
payload.push(j)
@@ -211,7 +211,7 @@ class Channel {
let x = JSON.stringify(payload);
req.send(x);
- this.lastEventId = this.lastAcknowledgedEventId;
+ this.lastAcknowledgedEventId = this.lastEventId;
}
this.outstandingJSON = [];
@@ -227,7 +227,7 @@ class Channel {
this.eventSource = new EventSource(this.channelURL(), {withCredentials:true});
this.eventSource.onmessage = e => {
- this.lastEventId = e.lastEventId;
+ this.lastEventId = parseInt(e.lastEventId, 10);
let obj = JSON.parse(e.data);
let pokeFuncs = this.outstandingPokes.get(obj.id);
|
pkg/types: move column template registration into init() instead of the manually called Init(nodeName) | @@ -25,9 +25,7 @@ type EventType string
var node string
-func Init(nodeName string) {
- node = nodeName
-
+func init() {
// Register column templates
columns.MustRegisterTemplate("comm", "maxWidth:16")
columns.MustRegisterTemplate("pid", "minWidth:7")
@@ -40,6 +38,10 @@ func Init(nodeName string) {
columns.MustRegisterTemplate("ipport", "minWidth:type")
}
+func Init(nodeName string) {
+ node = nodeName
+}
+
type CommonData struct {
// Node where the event comes from
Node string `json:"node,omitempty" column:"node,width:30,ellipsis:middle" columnTags:"kubernetes"`
|
wasm compilation fix (it's strange, but emscripten doesn't want to build with this include definition) | @@ -432,7 +432,6 @@ target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/external
target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/glew/GL)
target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/stb_image)
target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/stb_image_write)
-target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl2/include)
if(WIN32)
target_link_libraries(sdlgpu opengl32)
|
update versions in listchanges | #!/bin/bash
-t_old="obs/OpenHPC_1.1.1_Factory"
-t_new="obs/OpenHPC_1.2_Factory"
+t_old="obs/OpenHPC_1.2_Factory"
+t_new="obs/OpenHPC_1.2.1_Factory"
f_all=pkg-ohpc.all
f_add=pkg-ohpc.chglog-add
@@ -15,10 +15,13 @@ f_new=pkg-ohpc.new
rm -f ${f_add} ${f_del} ${f_upd}
rm -f ${f_dif} ${f_old} ${f_new}
-#git diff ${t_old} ${t_new} ${f_all} >${f_dif}
+
# updated to account for path rename (ks 7/30/15)
-git diff $t_old:docs/recipes/install/centos7.2/vanilla/data/manifest/${f_all} -- ${f_all} > ${f_dif}
+#git diff $t_old:docs/recipes/install/centos7.2/vanilla/data/manifest/${f_all} -- ${f_all} > ${f_dif}
+# revert back to normal diff (ks 1/9/17)
+git diff ${t_old} ${t_new} ${f_all} >${f_dif}
+
if [ $? -ne 0 ]; then
echo "ERROR: git diff failed!"
exit
|
Change import of Foreign.C which confused GHC 7.10 | @@ -31,7 +31,8 @@ module Foreign.Lua.Core.Auxiliary
import Control.Exception (IOException, try)
import Data.ByteString (ByteString)
-import Foreign.C (CChar, CInt (CInt), CSize (CSize), CString, withCString)
+import Foreign.C ( CChar, CInt (CInt), CSize (CSize), CString
+ , withCString, peekCString )
import Foreign.Lua.Core.Constants (multret, registryindex)
import Foreign.Lua.Core.Error (hsluaErrorRegistryField, throwTopMessage)
import Foreign.Lua.Core.Types (Lua, Reference, StackIndex, Status, liftLua)
@@ -40,7 +41,6 @@ import Foreign.Ptr
import System.IO.Unsafe (unsafePerformIO)
import qualified Data.ByteString as B
-import qualified Foreign.C as C
import qualified Foreign.Lua.Core.Functions as Lua
import qualified Foreign.Lua.Core.Types as Lua
import qualified Foreign.Lua.Utf8 as Utf8
@@ -58,8 +58,7 @@ import qualified Foreign.Storable as Storable
-- | Key, in the registry, for table of loaded modules.
loadedTableRegistryField :: String
-loadedTableRegistryField =
- unsafePerformIO (C.peekCString c_loaded_table)
+loadedTableRegistryField = unsafePerformIO (peekCString c_loaded_table)
{-# NOINLINE loadedTableRegistryField #-}
foreign import capi "lauxlib.h value LUA_LOADED_TABLE"
@@ -67,7 +66,7 @@ foreign import capi "lauxlib.h value LUA_LOADED_TABLE"
-- | Key, in the registry, for table of preloaded loaders.
preloadTableRegistryField :: String
-preloadTableRegistryField = unsafePerformIO (C.peekCString c_preload_table)
+preloadTableRegistryField = unsafePerformIO (peekCString c_preload_table)
{-# NOINLINE preloadTableRegistryField #-}
foreign import capi "lauxlib.h value LUA_PRELOAD_TABLE"
|
rdma: print device info from PCI VPD in 'show hardware' output
Type: improvement | @@ -75,13 +75,27 @@ format_rdma_bit_flag (u8 * s, va_list * args)
u8 *
format_rdma_device (u8 * s, va_list * args)
{
+ vlib_main_t *vm = vlib_get_main ();
u32 i = va_arg (*args, u32);
rdma_main_t *rm = &rdma_main;
rdma_device_t *rd = vec_elt_at_index (rm->devices, i);
+ vlib_pci_device_info_t *d;
u32 indent = format_get_indent (s);
s = format (s, "netdev %v pci-addr %U\n", rd->linux_ifname,
format_vlib_pci_addr, &rd->pci->addr);
+ if ((d = vlib_pci_get_device_info (vm, &rd->pci->addr, 0)))
+ {
+ s = format (s, "%Uproduct name: %s\n", format_white_space, indent,
+ d->product_name ? (char *) d->product_name : "");
+ s = format (s, "%Upart number: %U\n", format_white_space, indent,
+ format_vlib_pci_vpd, d->vpd_r, "PN");
+ s = format (s, "%Urevision: %U\n", format_white_space, indent,
+ format_vlib_pci_vpd, d->vpd_r, "EC");
+ s = format (s, "%Userial number: %U\n", format_white_space, indent,
+ format_vlib_pci_vpd, d->vpd_r, "SN");
+ vlib_pci_free_device_info (d);
+ }
s = format (s, "%Uflags: %U", format_white_space, indent,
format_rdma_device_flags, rd);
if (rd->error)
|
groups: tabs use cursor: pointer | @@ -90,6 +90,7 @@ const Tab = ({ selected, id, label, setSelected }) => (
borderBottom={selected === id ? 1 : 0}
borderBottomColor="black"
mr={2}
+ cursor='pointer'
onClick={() => setSelected(id)}
>
<Text color={selected === id ? "black" : "gray"}>{label}</Text>
|
Fix bad error code handling | @@ -2207,18 +2207,11 @@ ssize_t ngtcp2_conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
nwrite = conn_write_handshake_ack_pkts(conn, dest, destlen, ts);
if (nwrite < 0) {
- if (nwrite != NGTCP2_ERR_NOMEM) {
+ if (nwrite != NGTCP2_ERR_NOBUF) {
return nwrite;
}
- nwrite = 0;
} else {
- if ((size_t)nwrite > cwnd) {
- return nwrite;
- }
-
res += nwrite;
- cwnd -= (size_t)nwrite;
-
dest += nwrite;
destlen -= (size_t)nwrite;
}
@@ -2228,12 +2221,7 @@ ssize_t ngtcp2_conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
if (nwrite != NGTCP2_ERR_NOBUF) {
return nwrite;
}
- if (res == 0) {
- return nwrite;
- }
- return res;
- }
- if (nwrite) {
+ } else if (nwrite) {
return res + nwrite;
}
@@ -2249,7 +2237,7 @@ ssize_t ngtcp2_conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest, size_t destlen,
}
return res;
}
-
+ assert(nwrite);
return res + nwrite;
}
|
chat-view: crash on joining own chat | ~[(chat-hook-poke %add-synced ship.act app-path.act ask-history.act)]
=/ rid=resource
(de-path:resource ship+app-path.act)
+ ?< =(our.bol entity.rid)
=/ =cage
:- %group-update
!> ^- action:group-store
|
Add Nucleo-L432 pinout to readme | @@ -46,11 +46,11 @@ Implementation of low-level part (together with memory allocation for library) i
Use connector **CN2** to connect ESP-01 module with the board
```
-Detailed pinout on STM32F769I-Discovery board
+Detailed pinout for STM32F769I-Discovery board
ESP-01 connection
-- ESP_TX: PC12
-- ESP_RX: PD2
+- ESP_RX: PC12
+- ESP_TX: PD2
- ESP_RESET: PJ14
- UART: UART5
@@ -71,11 +71,11 @@ Driver implementation is available in [esp_ll_stm32f769i_discovery.c](/src/syste
Use connector **CN14** to connect ESP-01 module with the board
```
-Detailed pinout on STM32F723E-Discovery board
+Detailed pinout for STM32F723E-Discovery board
ESP-01 connection
-- ESP_TX: PC12
-- ESP_RX: PD2
+- ESP_RX: PC12
+- ESP_TX: PD2
- ESP_RESET: PG14
- ESP_CH_PD: PD3
- ESP_GPIO_2: PD6
@@ -99,11 +99,11 @@ Driver implementation is available in [esp_ll_stm32f723e_discovery.c](/src/syste
Discovery comes with STMOD+ extensions board which includes connector marked as **ESP-01**.
```
-Detailed pinout on STM32L496G-Discovery board
+Detailed pinout for STM32L496G-Discovery board
ESP-01 connection
-- ESP_TX: PB6
-- ESP_RX: PG10, pin connected on VDDIO2 domain, make sure it is enabled in PWR registers
+- ESP_RX: PB6
+- ESP_TX: PG10, pin connected on VDDIO2 domain, make sure it is enabled in PWR registers
- ESP_RESET: PB2
- ESP_CH_PD: PA4
- ESP_GPIO_0: PH0
@@ -122,3 +122,30 @@ DEBUG UART, connected through ST-LinkV2/1
```
Driver implementation is available in [esp_ll_stm32l496g_discovery.c](/src/system/esp_ll_stm32l496g_discovery.c)
+
+## STM32L432KC-Nucleo
+
+```
+Detailed pinout for STM32L432KC-Nucleo board
+
+ESP-01 connection
+- ESP_RX: PA9
+- ESP_TX: PA10
+- ESP_RESET: PA12
+- ESP_CH_PD: PB0
+- ESP_GPIO_0: PA7
+- ESP_GPIO_2: PA6
+
+- UART: USART1
+- UART DMA: DMA1
+- UART DMA CHANNEL: DMA_CHANNEL_5
+- UART DMA REQUEST: DMA_REQUEST_2
+
+DEBUG UART, connected through ST-LinkV2/1
+- UART: USART2
+- UART_TX: PA2
+- UART_RX: PA3
+- UART baudrate: 921600
+```
+
+Driver implementation is available in [esp_ll_stm32l432kc_nucleo.c](/src/system/esp_ll_stm32l432kc_nucleo.c)
|
out_kafka: upgrade librdkafka path v1.7.0 | @@ -4,10 +4,10 @@ FLB_OPTION(RDKAFKA_BUILD_EXAMPLES Off)
FLB_OPTION(RDKAFKA_BUILD_TESTS Off)
FLB_OPTION(ENABLE_LZ4_EXT Off)
-add_subdirectory(librdkafka-1.6.0 EXCLUDE_FROM_ALL)
+add_subdirectory(librdkafka-1.7.0 EXCLUDE_FROM_ALL)
# librdkafka headers
-include_directories(librdkafka-1.6.0/src/)
+include_directories(librdkafka-1.7.0/src/)
# Fluent Bit Kafka Output plugin
set(src
|
sailfish: better be slowly, but tested | @@ -158,7 +158,7 @@ QtMainWindow::QtMainWindow(QObject *parent) : QObject(parent),
commitWebViewsList();
//qDebug() << "Available cameras: " + QString::number(QCameraInfo::availableCameras().size());
- QTimer::singleShot(500, [&](){this->showEvent()})
+ QTimer::singleShot(500, [&](){this->showEvent();});
qDebug() << "End of main window cunstruction";
}
|
restyled: update formatters | @@ -26,12 +26,12 @@ restylers:
- "-i"
- "--style=file"
- prettier:
- image: restyled/restyler-prettier:v2.3.2
+ image: restyled/restyler-prettier:v2.5.1
- prettier-markdown:
- image: restyled/restyler-prettier:v2.3.2
+ image: restyled/restyler-prettier:v2.5.1
arguments: []
- shfmt:
- image: restyled/restyler-shfmt:v3.3.1
+ image: restyled/restyler-shfmt:v3.4.3
arguments:
- -s
- -sr
|
Partially reversed SceGxmTexture struct. | @@ -1022,7 +1022,32 @@ typedef struct SceGxmVertexStream {
} SceGxmVertexStream;
typedef struct SceGxmTexture {
- unsigned int controlWords[4];
+ // Control Word 0
+ uint32_t unk0 : 3;
+ uint32_t vaddr_mode : 3;
+ uint32_t uaddr_mode : 3;
+ uint32_t mip_filter : 1;
+ uint32_t min_filter: 2;
+ uint32_t mag_filter : 2;
+ uint32_t unk1 : 3;
+ uint32_t mip_count : 4;
+ uint32_t lod_bias : 6;
+ uint32_t gamma_mode : 2;
+ uint32_t unk2 : 2;
+ uint32_t format0 : 1;
+ // Control Word 1
+ uint32_t height : 12;
+ uint32_t width : 12;
+ uint32_t base_format : 5;
+ uint32_t type : 3;
+ // Control Word 2
+ uint32_t unk3 : 2;
+ uint32_t data_addr : 30;
+ // Control Word 3
+ uint32_t palette_addr : 26;
+ uint32_t unk4 : 2;
+ uint32_t swizzle_format : 3;
+ uint32_t normalize_mode : 1;
} SceGxmTexture;
typedef struct SceGxmColorSurface {
|
firdes/autotest: adding test for freqrespf and freqrespcf | @@ -359,3 +359,60 @@ void autotest_firdes_doppler()
liquid_autotest_verbose ? "autotest_firdes_doppler.m" : NULL);
}
+// check frequency response (real-valued coefficients)
+void autotest_liquid_freqrespf()
+{
+ // design filter
+ unsigned int h_len = 41;
+ float h[h_len];
+ liquid_firdes_kaiser(h_len, 0.27f, 80.0f, 0.3f, h);
+
+ // compute frequency response with FFT
+ unsigned int i, nfft = 400;
+ float complex buf_time[nfft], buf_freq[nfft];
+ for (i=0; i<nfft; i++)
+ buf_time[i] = i < h_len ? h[i] : 0.0f;
+ fft_run(nfft, buf_time, buf_freq, LIQUID_FFT_FORWARD, 0);
+
+ // compare to manual calculation
+ float tol = 1e-5f;
+ for (i=0; i<nfft; i++) {
+ float fc = (float)i/(float)nfft + (i >= nfft/2 ? -1.0f : 0.0f);
+ float complex H;
+ liquid_freqrespf(h, h_len, fc, &H);
+
+ CONTEND_DELTA(crealf(buf_freq[i]), crealf(H), tol);
+ CONTEND_DELTA(cimagf(buf_freq[i]), cimagf(H), tol);
+ }
+}
+
+// check frequency response (complex-valued coefficients)
+void autotest_liquid_freqrespcf()
+{
+ // design filter and apply complex phasor
+ unsigned int i, h_len = 41;
+ float hf[h_len];
+ liquid_firdes_kaiser(h_len, 0.27f, 80.0f, 0.3f, hf);
+ float complex h[h_len];
+ for (i=0; i<h_len; i++)
+ h[i] = hf[i] * cexpf(_Complex_I*0.1f*(float)(i*i));
+
+ // compute frequency response with FFT
+ unsigned int nfft = 400;
+ float complex buf_time[nfft], buf_freq[nfft];
+ for (i=0; i<nfft; i++)
+ buf_time[i] = i < h_len ? h[i] : 0.0f;
+ fft_run(nfft, buf_time, buf_freq, LIQUID_FFT_FORWARD, 0);
+
+ // compare to manual calculation
+ float tol = 1e-5f;
+ for (i=0; i<nfft; i++) {
+ float fc = (float)i/(float)nfft + (i >= nfft/2 ? -1.0f : 0.0f);
+ float complex H;
+ liquid_freqrespcf(h, h_len, fc, &H);
+
+ CONTEND_DELTA(crealf(buf_freq[i]), crealf(H), tol);
+ CONTEND_DELTA(cimagf(buf_freq[i]), cimagf(H), tol);
+ }
+}
+
|
Set SWITCH_RATIO for Arm(R) Neoverse(TM) V1 CPUs
From testing this yields better results than the default of `2`. | @@ -3367,6 +3367,8 @@ is a big desktop or server with abundant cache rather than a phone or embedded d
#elif defined(NEOVERSEV1)
+#define SWITCH_RATIO 16
+
#define SGEMM_DEFAULT_UNROLL_M 16
#define SGEMM_DEFAULT_UNROLL_N 4
|
fix Twitter link in README
Twitter broke their JS-style links. | @@ -67,7 +67,7 @@ See [{file:CHANGELOG.md}](CHANGELOG.md)
- *RubyGems* *repo*: https://rubygems.org/gems/oj
-Follow [@peterohler on Twitter](http://twitter.com/#!/peterohler) for announcements and news about the Oj gem.
+Follow [@peterohler on Twitter](http://twitter.com/peterohler) for announcements and news about the Oj gem.
#### Performance Comparisons
|
haskell-cabal-sandboxing: adjust travis file for after the rebase | @@ -138,7 +138,7 @@ before_script:
fi
# use a minimal configuration for the haskell bindings to give it enough time to compile dependencies
- if [[ $HASKELL == ON ]]; then bindings="cpp;haskell"; fi
- - if [[ $HASKELL == ON ]]; then plugins="resolver_fm_hpu_b;dump;haskell;ini;sync;error;list;ipaddr;hosts;spec"; fi
+ - if [[ $HASKELL == ON ]]; then plugins="resolver_fm_hpu_b;dump;haskell;ini;sync;error;spec;list;profile;regex;tracer;timeofday"; fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
python2_ver=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \
|
TEST: fix the blocked test when KEY_MAX_LENGTH is increased. | @@ -13488,7 +13488,7 @@ static int try_read_command(conn *c) {
el = memchr(c->rcurr, '\n', c->rbytes);
if (!el) {
- if (c->rbytes >= (32* 1024)) {
+ if (c->rbytes > 1024) {
/*
* We didn't have a '\n' in the first k. This _has_ to be a
* large multiget, if not we should just nuke the connection.
@@ -13497,7 +13497,6 @@ static int try_read_command(conn *c) {
while (*ptr == ' ') { /* ignore leading whitespaces */
++ptr;
}
-
if (ptr - c->rcurr > 100) {
mc_logger->log(EXTENSION_LOG_WARNING, c,
"%d: Too many leading whitespaces(%d). Close the connection.\n",
@@ -13505,6 +13504,8 @@ static int try_read_command(conn *c) {
conn_set_state(c, conn_closing);
return 1;
}
+ if (c->rbytes >= (32*1024))
+ {
if (strncmp(ptr, "get ", 4) && strncmp(ptr, "gets ", 5)) {
char buffer[16];
memcpy(buffer, ptr, 15); buffer[15] = '\0';
@@ -13515,6 +13516,7 @@ static int try_read_command(conn *c) {
return 1;
}
}
+ }
return 0;
}
|
crypto: fix error handling in forked child process
See and . | @@ -787,7 +787,7 @@ int CRYPTO_PLUGIN_FUNCTION (gpgCall) (KeySet * conf, Key * errorKey, Key * msgKe
if (dup (pipe_stdin[0]) < 0)
{
ELEKTRA_SET_ERROR (ELEKTRA_ERROR_CRYPTO_GPG, errorKey, "failed to redirect stdin.");
- return -2;
+ exit (42);
}
}
close (pipe_stdin[0]);
@@ -797,7 +797,7 @@ int CRYPTO_PLUGIN_FUNCTION (gpgCall) (KeySet * conf, Key * errorKey, Key * msgKe
if (dup (pipe_stdout[1]) < 0)
{
ELEKTRA_SET_ERROR (ELEKTRA_ERROR_CRYPTO_GPG, errorKey, "failed to redirect the stdout.");
- return -2;
+ exit (42);
}
close (pipe_stdout[1]);
@@ -806,7 +806,7 @@ int CRYPTO_PLUGIN_FUNCTION (gpgCall) (KeySet * conf, Key * errorKey, Key * msgKe
if (dup (pipe_stderr[1]) < 0)
{
ELEKTRA_SET_ERROR (ELEKTRA_ERROR_CRYPTO_GPG, errorKey, "failed to redirect stderr.");
- return -2;
+ exit (42);
}
close (pipe_stderr[1]);
@@ -814,7 +814,7 @@ int CRYPTO_PLUGIN_FUNCTION (gpgCall) (KeySet * conf, Key * errorKey, Key * msgKe
if (execv (argv[0], argv) < 0)
{
ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_CRYPTO_GPG, errorKey, "failed to start the gpg binary: %s", argv[0]);
- return -2;
+ exit (42);
}
// end of the child process
}
@@ -863,7 +863,7 @@ int CRYPTO_PLUGIN_FUNCTION (gpgCall) (KeySet * conf, Key * errorKey, Key * msgKe
ELEKTRA_SET_ERROR (ELEKTRA_ERROR_CRYPTO_GPG, errorKey, "GPG reported a bad signature");
break;
- case -2:
+ case 42:
// error has been set to errorKey by the child process
break;
|
doc: explain dependencies in more details | @@ -200,8 +200,8 @@ The minimal set of plugins you should add:
(e.g. an empty value).
See [kdb-mount(1)](/doc/help/kdb-mount.md).
-By default nearly all plugins are added. Only experimental plugins
-will be omitted:
+By default CMake adds nearly all plugins if the dependencies are present.
+Only experimental plugins will be omitted by default:
```sh
-DPLUGINS="ALL;-EXPERIMENTAL"
@@ -213,7 +213,9 @@ To add also experimental plugins, you can use:
-DPLUGINS=ALL
```
-> Note that plugins get dropped automatically if dependences are not satisfied.
+> Note that plugins are excluded automatically if dependences are not satisfied.
+> So make sure to install all dependencies you need before you run `cmake`.
+> For example, to include the plugin `yajl`, make sure `libyajl-dev` is installed.
To add all plugins except some plugins you can use:
|
VERSION bump to version 2.1.92 | @@ -64,7 +64,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 1)
-set(SYSREPO_MICRO_VERSION 91)
+set(SYSREPO_MICRO_VERSION 92)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
clangcl.exe - Add default inititalizer | @@ -1447,8 +1447,8 @@ void compress_block(
// find best blocks for 2, 3 and 4 partitions
for (int partition_count = 2; partition_count <= max_partitions; partition_count++)
{
- int partition_indices_1plane[2];
- int partition_index_2planes;
+ int partition_indices_1plane[2] { 0, 0 };
+ int partition_index_2planes = 0;
find_best_partitionings(bsd, blk, ewb, partition_count,
ctx.config.tune_partition_index_limit,
|
remove accidental define | @@ -8,8 +8,6 @@ terms of the MIT license. A copy of the license can be found in the file
#define _DEFAULT_SOURCE // ensure mmap flags are defined
#endif
-#define MI_USE_SBRK
-
#if defined(__sun)
// illumos provides new mman.h api when any of these are defined
// otherwise the old api based on caddr_t which predates the void pointers one.
|
Fixes Docfilter connector : add default values for exclude filters | @@ -368,8 +368,25 @@ public class DocFilter extends org.apache.manifoldcf.agents.transformation.BaseT
final List<String> includeFilters = new ArrayList<>();
final List<String> excludeFilters = new ArrayList<>();
+ if (os.getChildCount() == 0) {
+ excludeFilters.add("\\/~.*");
+ excludeFilters.add("\\.(?i)pst(?-i)$");
+ excludeFilters.add("\\.(?i)gz(?-i)$");
+ excludeFilters.add("\\.(?i)ini(?-i)$");
+ excludeFilters.add("\\.(?i)tar(?-i)$");
+ excludeFilters.add("\\.(?i)lnk(?-i)$");
+ excludeFilters.add("\\.(?i)db(?-i)$");
+ excludeFilters.add("\\.(?i)odb(?-i)$");
+ excludeFilters.add("\\.(?i)mat(?-i)$");
+ excludeFilters.add("\\/\\..*");
+ excludeFilters.add("\\.(?i)tgz(?-i)$");
+ excludeFilters.add("\\.(?i)zip(?-i)$");
+ excludeFilters.add("\\.(?i)rar(?-i)$");
+ excludeFilters.add("\\.(?i)7z(?-i)$");
+ excludeFilters.add("\\.(?i)bz2(?-i)$");
+ }
String maxDocSize = "";
- String minDocSize = "";
+ String minDocSize = "1";
String filterField = "";
for (int i = 0; i < os.getChildCount(); i++) {
|
Remove _assigned and _used from typechecker
This should be replaced by a more powerful lifetime analysis, in a
separate pass. | @@ -288,10 +288,6 @@ check_stat = function(node, errors)
elseif texp._tag == types.T.Function then
type_error(errors, node.loc, "trying to assign to a function")
else
- -- mark this declared variable as assigned to
- if node.var._tag == ast.Var.Name and node.var._decl then
- node.var._decl._assigned = true
- end
if node.var._tag ~= ast.Var.Bracket or node.exp._type._tag ~= types.T.Nil then
checkmatch("assignment", node.var._type, node.exp._type, errors, node.var.loc)
end
@@ -332,7 +328,6 @@ end
check_var = function(node, errors)
local tag = node._tag
if tag == ast.Var.Name then
- node._decl._used = true
node._type = node._decl._type
elseif tag == ast.Var.Dot then
|
FIB: remove assert from adj src
this is the case when the ADJ fib is in the non-forwarding trie | @@ -292,7 +292,6 @@ fib_entry_src_adj_deactivate (fib_entry_src_t *src,
/*
* remove the depednecy on the covering entry
*/
- ASSERT(FIB_NODE_INDEX_INVALID != src->u.adj.fesa_cover);
cover = fib_entry_get(src->u.adj.fesa_cover);
fib_entry_cover_untrack(cover, src->u.adj.fesa_sibling);
|
Fix reference to wrong view in release notes
The estimate of total backup size effects the view
pg_stat_progress_basebackup, not pg_stat_progress_analyze. | @@ -2319,7 +2319,7 @@ Author: Author: Fujii Masao <[email protected]>
<para>
This computation allows <link
- linkend="monitoring-stats-dynamic-views-table"><structname>pg_stat_progress_analyze</structname></link>
+ linkend="monitoring-stats-dynamic-views-table"><structname>pg_stat_progress_basebackup</structname></link>
to show progress, and can be disabled by using the
<option>--no-estimate-size</option> option. Previously, this
computation happened only if <option>--progress</option> was used.
|
Listening sockets remaining from the previous configuration
were not updated with new parameters. | @@ -1532,6 +1532,7 @@ nxt_router_listen_socket_update(nxt_task_t *task, void *obj, void *data)
old = listen->socket.data;
listen->socket.data = joint;
+ listen->listen = &joint->socket_conf->listen;
job->work.next = NULL;
job->work.handler = nxt_router_conf_wait;
|
decision: add thoughts of regarding splitting key into key name and key data | @@ -319,6 +319,14 @@ struct _Key {
};
```
+@mpranj's thoughts regarding moving name and data to separate structures:
+
+> 1. If they [key name and data] are a separate entity, `mmapstorage` will need a flag once again for each of those.
+> This is used to mark whether the data is in an mmap region or not. (or we find some bit somewhere that we can steal for this purpose)
+>
+> 2. Adding more indirections is probably not going to help performance. (I understand that we save memory here)
+
+
The following calculations are based on the AMD64 platform:
In the data structures above, an empty key does have
|
Updates zlib download url to 1.2.10, the previous used version is no longer available. | @@ -87,9 +87,9 @@ RUN curl -L -O http://downloads.sourceforge.net/libuuid/libuuid-1.0.3.tar.gz &&
# zlib
-RUN curl -L -O http://zlib.net/zlib-1.2.8.tar.gz && \
- tar -xvzf zlib-1.2.8.tar.gz && \
- cd zlib-1.2.8 && \
+RUN curl -L -O http://zlib.net/zlib-1.2.10.tar.gz &&
+ tar -xvzf zlib-*.tar.gz && \
+ cd zlib-* && \
./configure --prefix=/build/output/zlib && make && make install
# curl
|
ESP32 example: return value fixes | @@ -131,6 +131,7 @@ static esp_err_t mqtt_event_handler(esp_mqtt_event_handle_t event)
Logger.Error("MQTT event UNKNOWN");
break;
}
+ return ESP_OK;
}
static void initializeIoTHubClient()
@@ -214,7 +215,7 @@ static uint32_t getEpochTimeInSecs()
return (uint32_t)time(NULL);
}
-static int establishConnection()
+static void establishConnection()
{
connectToWiFi();
initializeTime();
|
create soft link for libpmi.so -> libpmix.so | @@ -55,6 +55,11 @@ CFLAGS="%{optflags}" ./configure --prefix=%{install_path}
%install
%{__make} install DESTDIR=${RPM_BUILD_ROOT}
+# PMIx provides PMI1 and PMI2 interfaces in libmpix, but many packages check
+# linkage against libpmi.so directly - create soft link to libpmix.so
+
+%{__ln_s} ${RPM_BUILD_ROOT}/%{install_path}/lib/libpmix.so ${RPM_BUILD_ROOT}/%{install_path}/lib/libpmi.so
+
%{__mkdir_p} ${RPM_BUILD_ROOT}%{OHPC_MODULES}/%{pname}
cat <<EOF > ${RPM_BUILD_ROOT}%{OHPC_MODULES}/%{pname}/%{version}
#%Module1.0#####################################################################
|
luatable can set negative/zeor int as key | @@ -1022,19 +1022,17 @@ end
internal object getObject(int reference, int index)
{
if (index >= 1) {
- int oldTop = LuaDLL.lua_gettop (L);
LuaDLL.lua_getref (L, reference);
LuaDLL.lua_rawgeti (L, -1, index);
object returnValue = getObject (L, -1);
- LuaDLL.lua_settop (L, oldTop);
+ LuaDLL.lua_pop (L, 1);
return returnValue;
} else {
- int oldTop = LuaDLL.lua_gettop (L);
LuaDLL.lua_getref (L, reference);
LuaDLL.lua_pushinteger (L, index);
LuaDLL.lua_gettable (L, -2);
object returnValue = getObject (L, -1);
- LuaDLL.lua_settop (L, oldTop);
+ LuaDLL.lua_pop (L, 1);
return returnValue;
}
}
@@ -1075,16 +1073,18 @@ end
internal void setObject(int reference, int index, object o)
{
- if (index >= 1)
- {
- int oldTop = LuaDLL.lua_gettop(L);
+ if (index >= 1) {
LuaDLL.lua_getref (L, reference);
LuaObject.pushVar (L, o);
LuaDLL.lua_rawseti (L, -2, index);
- LuaDLL.lua_settop(L, oldTop);
- return;
+ LuaDLL.lua_pop (L, 1);
+ } else {
+ LuaDLL.lua_getref (L, reference);
+ LuaDLL.lua_pushinteger (L, index);
+ LuaObject.pushVar (L, o);
+ LuaDLL.lua_settable (L, -3);
+ LuaDLL.lua_pop (L, 1);
}
- throw new IndexOutOfRangeException();
}
internal void setObject(int reference, object field, object o)
|
baseboard/volteer/charger.c: Format with clang-format
BRANCH=none
TEST=none | @@ -30,8 +30,7 @@ const struct charger_config_t chg_chips[] = {
int board_set_active_charge_port(int port)
{
- int is_valid_port = (port >= 0 &&
- port < CONFIG_USB_PD_PORT_MAX_COUNT);
+ int is_valid_port = (port >= 0 && port < CONFIG_USB_PD_PORT_MAX_COUNT);
int i;
if (port == CHARGE_PORT_NONE) {
@@ -52,7 +51,6 @@ int board_set_active_charge_port(int port)
return EC_ERROR_INVAL;
}
-
/* Check if the port is sourcing VBUS. */
if (ppc_is_sourcing_vbus(port)) {
CPRINTFUSB("Skip enable C%d", port);
@@ -85,9 +83,8 @@ int board_set_active_charge_port(int port)
__overridable void board_set_charge_limit(int port, int supplier, int charge_ma,
int max_ma, int charge_mv)
{
- charge_set_input_current_limit(MAX(charge_ma,
- CONFIG_CHARGER_INPUT_CURRENT),
- charge_mv);
+ charge_set_input_current_limit(
+ MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv);
}
void board_overcurrent_event(int port, int is_overcurrented)
|
cirrus: remove jobs migrated to github actions | @@ -32,7 +32,7 @@ jobs:
CC: clang
CXX: clang++
ENABLE_LOGGER: ON
- TOOLS: ALL;web
+ TOOLS: NODEP
PLUGINS: ALL
BINDINGS: ALL;-rust
- name: Clang ASAN
@@ -155,7 +155,7 @@ jobs:
-GNinja
-DPLUGINS="${PLUGINS:-ALL}"
-DBINDINGS="${BINDINGS:-ALL}"
- -DTOOLS="${TOOLS:-DEFAULT}"
+ -DTOOLS="${TOOLS:-NODEP}"
-DBUILD_FULL="${BUILD_FULL:-OFF}"
-DBUILD_SHARED="${BUILD_SHARED:-ON}"
-DENABLE_ASAN="${ENABLE_ASAN:-OFF}"
|
[http3] Support macOS in 40http3-forward-initial | @@ -51,9 +51,6 @@ This will generate quic-nondecryptable-initial.bin.
check_dtrace_availability();
-plan skip_all => 'This test only supports Linux'
- unless $^O eq 'linux';
-
plan skip_all => 'python3 not found'
unless prog_exists('python3');
@@ -100,18 +97,30 @@ if ($tracer_pid == 0) {
close STDOUT;
open STDOUT, ">", "$tempdir/trace.out"
or die "failed to create temporary file:$tempdir/trace.out:$!";
+ if ($^O eq 'linux') {
exec qw(bpftrace -v -B none -p), $server->{pid}, "-e", <<'EOT';
usdt::h2o:h3_packet_forward { printf("num_packets=%d num_bytes=%d\n", arg2, arg3); }
EOT
die "failed to spawn bpftrace:$!";
+ } else {
+ exec(
+ qw(unbuffer dtrace -p), $server->{pid}, "-n", <<'EOT',
+:h2o::h3_packet_forward {
+ printf("\nXXXXnum_packets=%d num_bytes=%d\n", arg2, arg3);
+}
+EOT
+ );
+ die "failed to spawn dtrace:$!";
+ }
}
# wait until bpftrace and the trace log becomes ready
my $read_trace = get_tracer($tracer_pid, "$tempdir/trace.out");
-# note: this cond is only needed for Linux/bpftrace
+if ($^O eq 'linux') {
while ($read_trace->() eq '') {
sleep 1;
}
+}
sleep 2;
# throw packets to h2o
|
input_manager: fix potential memory leak on text
Fix potential memory leak when controller_push_event failed. | @@ -144,6 +144,7 @@ void input_manager_process_text_input(struct input_manager *input_manager,
return;
}
if (!controller_push_event(input_manager->controller, &control_event)) {
+ SDL_free(control_event.text_event.text);
LOGW("Cannot send text event");
}
}
|
DM USB: add libusb error conversion function
Add a function to covert libusb error to the common USB core
error type.
Acked-by: Eddie Dong | static struct usb_dev_sys_ctx_info g_ctx;
+static inline int
+usb_dev_err_convert(int err)
+{
+ switch (err) {
+ case LIBUSB_ERROR_TIMEOUT: return USB_ERR_TIMEOUT;
+ case LIBUSB_ERROR_PIPE: return USB_ERR_STALLED;
+ case LIBUSB_ERROR_NO_DEVICE: return USB_ERR_INVAL;
+ case LIBUSB_ERROR_BUSY: return USB_ERR_IN_USE;
+ case LIBUSB_ERROR_OVERFLOW: return USB_ERR_TOO_DEEP;
+ default:
+ break; /* add more when required */
+ }
+ return USB_ERR_IOERROR;
+}
+
static int
usb_dev_native_toggle_if_drivers(struct usb_dev *udev, int attach)
{
|
GIF loader: check bad image separator, ensure left/top offset of image don't reach image margins | @@ -275,7 +275,7 @@ gif_out_code(
return;
}
- g->out[g->cur_x + g->cur_y * g->line_size] = g->codes[code].suffix;
+ g->out[g->cur_x + g->cur_y * g->max_x] = g->codes[code].suffix;
if (g->cur_x >= g->actual_width) {
g->actual_width = g->cur_x + 1;
}
@@ -433,7 +433,7 @@ gif_load_next(
y = gif_get16le(s); /* Image Top Position (2 bytes) */
w = gif_get16le(s); /* Image Width (2 bytes) */
h = gif_get16le(s); /* Image Height (2 bytes) */
- if (((x + w) > (g->w)) || ((y + h) > (g->h))) {
+ if (x >= g->w || y >= g->h || x + w > g->w || y + h > g->h) {
sixel_helper_set_additional_message(
"corrupt GIF (reason: bad Image Separator).");
status = SIXEL_RUNTIME_ERROR;
|
Utilities: CreateVault optimized with ShellCheck | @@ -45,13 +45,11 @@ cd "${OCPath}" || abort "Failed to reach ${OCPath}"
/usr/libexec/PlistBuddy -c "Add Version integer 1" vault.plist || abort "Failed to set vault.plist version"
echo "Hashing files in ${OCPath}..."
-## ShellCheck Exception(s)
-## https://github.com/koalaman/shellcheck/wiki/SC2162
-# shellcheck disable=SC2162
+
/usr/bin/find . -not -path '*/\.*' -type f \
\( ! -iname ".*" \) \
\( ! -iname "vault.*" \) \
- \( ! -iname "OpenCore.efi" \) | while read fname; do
+ \( ! -iname "OpenCore.efi" \) | while read -r fname; do
fname="${fname#"./"}"
wname="${fname//\//\\\\}"
shasum=$(/usr/bin/shasum -a 256 "${fname}") || abort "Failed to hash ${fname}"
|
frsky: delay STATE_UPDATE by one loop to allow for late frame | @@ -447,11 +447,10 @@ static uint8_t frsky_d_handle_packet() {
cc2500_strobe(CC2500_SRX);
}
- if ((debug_timer_micros() - telemetry_time) < SYNC_DELAY_MAX) {
- break;
- }
-
+ if ((debug_timer_micros() - telemetry_time) >= SYNC_DELAY_MAX) {
protocol_state = STATE_UPDATE;
+ }
+ break;
//fallthrough
case STATE_UPDATE:
frame_had_packet = 0;
|
Update PhCreateFile return status for filenames | @@ -8209,7 +8209,7 @@ NTSTATUS PhCreateFile(
_Out_ PHANDLE FileHandle,
_In_ PPH_STRING FileName,
_In_ ACCESS_MASK DesiredAccess,
- _In_opt_ ULONG FileAttributes,
+ _In_ ULONG FileAttributes,
_In_ ULONG ShareAccess,
_In_ ULONG CreateDisposition,
_In_ ULONG CreateOptions
@@ -8222,7 +8222,7 @@ NTSTATUS PhCreateFile(
IO_STATUS_BLOCK isb;
if (!PhStringRefToUnicodeString(&FileName->sr, &fileName))
- return STATUS_UNSUCCESSFUL;
+ return STATUS_NAME_TOO_LONG;
InitializeObjectAttributes(
&objectAttributes,
@@ -8450,7 +8450,7 @@ NTSTATUS PhQueryFullAttributesFile(
OBJECT_ATTRIBUTES objectAttributes;
if (!PhStringRefToUnicodeString(&FileName->sr, &fileName))
- return STATUS_UNSUCCESSFUL;
+ return STATUS_NAME_TOO_LONG;
InitializeObjectAttributes(
&objectAttributes,
@@ -8509,7 +8509,7 @@ NTSTATUS PhQueryAttributesFile(
OBJECT_ATTRIBUTES objectAttributes;
if (!PhStringRefToUnicodeString(&FileName->sr, &fileName))
- return STATUS_UNSUCCESSFUL;
+ return STATUS_NAME_TOO_LONG;
InitializeObjectAttributes(
&objectAttributes,
|
Added param 'arch' | @@ -63,6 +63,7 @@ extern "C" {
OVERLAY_PARAM_BOOL(io_write) \
OVERLAY_PARAM_BOOL(gpu_mem_clock) \
OVERLAY_PARAM_BOOL(gpu_core_clock) \
+ OVERLAY_PARAM_BOOL(arch) \
OVERLAY_PARAM_CUSTOM(fps_sampling_period) \
OVERLAY_PARAM_CUSTOM(output_file) \
OVERLAY_PARAM_CUSTOM(font_file) \
|
Removing more leftovers | #include "utils.h"
#include "inject.h"
-#define DEVMODE 0
-#define _MFD_CLOEXEC 0x0001U
-#define PARENT_PROC_NAME "start_scope"
#define GO_ENV_VAR "GODEBUG"
#define GO_ENV_SERVER_VALUE "http2server"
#define GO_ENV_CLIENT_VALUE "http2client"
@@ -154,15 +151,6 @@ main(int argc, char **argv, char **env)
showUsage(basename(argv[0]));
return EXIT_FAILURE;
}
-#if DEVMODE == 1
- //
- // DEVMODE is here only to help with gdb. The debugger has a problem
- // reading symbols from a /proc pathname. This is expected to be enabled
- // only by developers and only when using the debugger.
- //
- libraryArg = "./lib/linux/libscope.so";
- printf("LD_PRELOAD=%s\n", libraryArg);
-#endif
struct stat s;
if (stat(libraryArg, &s)) {
if (errno != ENOENT) {
|
Adjust ARMV8 SGEMM unrolling when using the C fallback kernel_2x2 for IOS | @@ -2590,8 +2590,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x03fffUL
+#if defined(OS_DARWIN) && defined(CROSS)
+#define SGEMM_DEFAULT_UNROLL_M 2
+#define SGEMM_DEFAULT_UNROLL N 2
+#else
#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
+#endif
#define DGEMM_DEFAULT_UNROLL_M 2
#define DGEMM_DEFAULT_UNROLL_N 2
|
refactoring for issue | @@ -48,7 +48,7 @@ u32 GetTypeNumSlots (u8 i_type)
}
i16 GetStackTopIndex (IM3Compilation o)
-{
+{ d_m3Assert (o->stackIndex > 0);
return o->stackIndex - 1;
}
@@ -100,13 +100,19 @@ i16 GetNumBlockValues (IM3Compilation o)
}
+bool IsStackIndexInRegister (IM3Compilation o, u16 i_stackIndex)
+{ d_m3Assert (i_stackIndex < o->stackIndex);
+ return (o->wasmStack [i_stackIndex] >= d_m3Reg0SlotAlias);
+}
+
+
bool IsStackTopInRegister (IM3Compilation o)
{
i16 i = GetStackTopIndex (o); d_m3Assert (i >= 0 or IsStackPolymorphic (o));
if (i >= 0)
{
- return (o->wasmStack [i] >= d_m3Reg0SlotAlias);
+ return IsStackIndexInRegister (o, (u16) i);
}
else return false;
}
@@ -143,7 +149,7 @@ bool IsStackTopMinus1InRegister (IM3Compilation o)
{
i16 i = GetStackTopIndex (o);
- if (i > 0)
+ if (i >= 1)
{
return (o->wasmStack [i - 1] >= d_m3Reg0SlotAlias);
}
@@ -570,15 +576,16 @@ bool PatchBranches (IM3Compilation o)
//-------------------------------------------------------------------------------------------------------------------------
-M3Result CopyTopSlot (IM3Compilation o, u16 i_destSlot)
+M3Result CopyStackSlot (IM3Compilation o, u16 i_stackIndex, u16 i_destSlot)
{
M3Result result = m3Err_none;
IM3Operation op;
- u8 type = GetStackTopType (o);
+ u8 type = GetStackBottomType (o, i_stackIndex);
+ bool inRegister = IsStackIndexInRegister (o, i_stackIndex);
- if (IsStackTopInRegister (o))
+ if (inRegister)
{
op = c_setSetOps [type];
}
@@ -587,8 +594,19 @@ M3Result CopyTopSlot (IM3Compilation o, u16 i_destSlot)
_ (EmitOp (o, op));
EmitSlotOffset (o, i_destSlot);
- if (IsStackTopInSlot (o))
- EmitSlotOffset (o, GetStackTopSlotIndex (o));
+ if (not inRegister)
+ EmitSlotOffset (o, o->wasmStack [i_stackIndex]);
+
+ _catch: return result;
+}
+
+
+M3Result CopyTopSlot (IM3Compilation o, u16 i_destSlot)
+{
+ M3Result result;
+
+ i16 stackTop = GetStackTopIndex (o);
+_ (CopyStackSlot (o, (u16) stackTop, i_destSlot));
_catch: return result;
}
|
[DeviceDrivers] Add critical_work for wqueue. | @@ -86,6 +86,28 @@ rt_err_t rt_workqueue_dowork(struct rt_workqueue* queue, struct rt_work* work)
return RT_EOK;
}
+rt_err_t rt_workqueue_critical_work(struct rt_workqueue* queue, struct rt_work* work)
+{
+ RT_ASSERT(queue != RT_NULL);
+ RT_ASSERT(work != RT_NULL);
+
+ rt_enter_critical();
+ /* NOTE: the work MUST be initialized firstly */
+ rt_list_remove(&(work->list));
+
+ rt_list_insert_after(queue->work_list.prev, &(work->list));
+ if (queue->work_thread->stat != RT_THREAD_READY)
+ {
+ rt_exit_critical();
+ /* resume work thread */
+ rt_thread_resume(queue->work_thread);
+ rt_schedule();
+ }
+ else rt_exit_critical();
+
+ return RT_EOK;
+}
+
rt_err_t rt_workqueue_cancel_work(struct rt_workqueue* queue, struct rt_work* work)
{
RT_ASSERT(queue != RT_NULL);
@@ -98,5 +120,21 @@ rt_err_t rt_workqueue_cancel_work(struct rt_workqueue* queue, struct rt_work* wo
return RT_EOK;
}
+rt_err_t rt_workqueue_cancel_all_work(struct rt_workqueue* queue)
+{
+ struct rt_list_node *node, *next;
+ RT_ASSERT(queue != RT_NULL);
+
+ rt_enter_critical();
+ for (node = queue->work_list.next; node != &(queue->work_list); node = next)
+ {
+ next = node->next;
+ rt_list_remove(node);
+ }
+ rt_exit_critical();
+
+ return RT_EOK;
+}
+
#endif
|
Update update_latest.yml to fix variable namespace issues. | @@ -42,7 +42,7 @@ jobs:
- name: Check Tag
run: |
- if [[ ${{needs.info.outputs.tag}} == '' || ${{needs.info.outputs.prerelease}} != '' ]]; then
+ if [[ ${{ steps.tag.outputs.tag }} == '' || ${{ steps.version.outputs.prerelease }} != '' ]]; then
echo "The git version ${{ steps.version.outputs.version }} is not usable..."
echo " It must start with a v, be a valid semantic version, and not be a prerelease"
exit 1
|
ci: add imxrt1064 runner | @@ -68,9 +68,9 @@ jobs:
_boot
rootfs-${{ matrix.target }}.tar
- test:
+ test-emu:
needs: build
- name: run tests
+ name: run tests on emulators
runs-on: ubuntu-latest
strategy:
matrix:
@@ -104,3 +104,39 @@ jobs:
uses: ./.github/actions/phoenix-runner
with:
target: ${{ matrix.target }}
+
+ test-hw:
+ needs: build
+ name: run tests on hardware
+ runs-on: ${{ matrix.target }}
+ strategy:
+ matrix:
+ target: ['armv7m7-imxrt106x']
+
+ steps:
+ - name: Checkout phoenix-rtos-project
+ uses: actions/checkout@v2
+ with:
+ repository: phoenix-rtos/phoenix-rtos-project
+ submodules: recursive
+
+ # step 2: update the submodule
+ - name: Update submodule ${{ github.event.repository.name }}
+ working-directory: ${{ github.event.repository.name }}
+ run: |
+ git fetch --recurse-submodules=no --force ${{ github.event.repository.git_url }} "+refs/heads/*:refs/remotes/origin/*"
+ git fetch --recurse-submodules=no --force ${{ github.event.repository.git_url }} "+refs/pull/*/head:refs/remotes/origin/pr/*"
+ git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }}
+
+ - name: Download build artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: phoenix-rtos-${{ matrix.target }}
+
+ - name: Untar rootfs
+ working-directory: _fs
+ run: tar -xvf ../rootfs-${{ matrix.target }}.tar
+
+ - name: Test runner
+ run: |
+ python3 ./phoenix-rtos-tests/runner.py -T${{ matrix.target }}
|
shim/runtime: Store inclavare-containers configuration | @@ -93,6 +93,7 @@ func New(ctx context.Context, id string, publisher shim.Publisher, shutdown func
ep: ep,
cancel: shutdown,
containers: make(map[string]*runc.Container),
+ config: make(map[string]*containerConfiguration),
}
go s.processExits()
runcC.Monitor = reaper.Default
@@ -104,6 +105,11 @@ func New(ctx context.Context, id string, publisher shim.Publisher, shutdown func
return s, nil
}
+type containerConfiguration struct {
+ binary string
+ root string
+}
+
// service is the shim implementation of a remote shim over GRPC
type service struct {
mu sync.Mutex
@@ -119,6 +125,7 @@ type service struct {
id string
containers map[string]*runc.Container
+ config map[string]*containerConfiguration
cancel func()
}
@@ -374,7 +381,26 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ *
//go attestation.Attestation_main(ctx, result)
}
+ ns, err := namespaces.NamespaceRequired(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ var runeRootGlobalOption string = process.RuncRoot
+ if opts.Root != "" {
+ runeRootGlobalOption = opts.Root
+ }
+ runeRootGlobalOption = filepath.Join(runeRootGlobalOption, ns)
+
+ config := &containerConfiguration{
+ binary: opts.BinaryName,
+ root: runeRootGlobalOption,
+ }
s.containers[r.ID] = container
+ s.config[r.ID] = config
+
+ logrus.Infof("s.config[%v] = %v", r.ID, s.config[r.ID])
+
s.send(&eventstypes.TaskCreate{
ContainerID: r.ID,
Bundle: r.Bundle,
|
Removes const from field (deleted move ctor) | @@ -128,8 +128,8 @@ namespace celix { namespace dm {
*/
std::size_t getNrOfComponents() const;
private:
- const std::shared_ptr<celix_bundle_context_t> context;
- const std::shared_ptr<celix_dependency_manager_t> cDepMan;
+ std::shared_ptr<celix_bundle_context_t> context;
+ std::shared_ptr<celix_dependency_manager_t> cDepMan;
std::vector<std::shared_ptr<BaseComponent>> components {};
};
|
Fix sysinfo window keyboard accelerator drawing when inactive | @@ -1510,7 +1510,7 @@ VOID PhSipDefaultDrawPanel(
stateId = -1;
- if (Section->GraphHot || Section->PanelHot || Section->HasFocus)
+ if (Section->GraphHot || Section->PanelHot || (Section->HasFocus && !Section->HideFocus))
{
if (Section == CurrentSection)
stateId = TREIS_HOTSELECTED;
|
Apache Mynewt 1.5.0 release | @@ -35,8 +35,8 @@ repo.versions:
"1.4.1": "mynewt_1_4_1_tag"
"1.5.0": "mynewt_1_5_0_tag"
- "0-latest": "1.4.1"
- "1-latest": "1.4.1"
+ "0-latest": "1.5.0"
+ "1-latest": "1.5.0"
"0-dev": "0.0.0" # master
"0.8-latest": "0.8.0"
@@ -57,6 +57,9 @@ repo.newt_compatibility:
# Core 1.1.0+ requires newt 1.1.0+ (feature: self-overrides).
# Core 1.4.0+ requires newt 1.4.0+ (feature: sync repo deps).
+ # Core 1.5.0+ requires newt 1.5.0+ (feature: transient packages)
+ 1.5.0:
+ 1.5.0: good
1.4.1:
1.4.0: good
1.4.0:
|
common: implement flash check error for l0 and f0 | #define FLASH_L0_OPTKEY2 0x24252627
#define FLASH_SR_BSY 0
+#define FLASH_SR_PG_ERR 2
+#define FLASH_SR_WRPRT_ERR 4
#define FLASH_SR_EOP 5
+#define FLASH_SR_ERROR_MASK ((1 << FLASH_SR_PG_ERR) | (1 << FLASH_SR_WRPRT_ERR))
+
#define FLASH_CR_PG 0
#define FLASH_CR_PER 1
#define FLASH_CR_MER 2
+#define FLASH_CR_OPTPG 4
#define FLASH_CR_STRT 6
#define FLASH_CR_LOCK 7
#define FLASH_CR_OPTWRE 9
#define STM32L0_FLASH_OPTLOCK (2)
#define STM32L0_FLASH_OBL_LAUNCH (18)
+#define STM32L0_FLASH_SR_ERROR_MASK 0x00003F00
+
#define FLASH_ACR_OFF ((uint32_t) 0x00)
#define FLASH_PECR_OFF ((uint32_t) 0x04)
#define FLASH_PDKEYR_OFF ((uint32_t) 0x08)
@@ -902,9 +909,18 @@ static void wait_flash_busy_progress(stlink_t *sl) {
static int check_flash_error(stlink_t *sl)
{
uint32_t res = 0;
- if ((sl->flash_type == STLINK_FLASH_TYPE_G0) ||
- (sl->flash_type == STLINK_FLASH_TYPE_G4)) {
+ switch (sl->flash_type) {
+ case STLINK_FLASH_TYPE_F0:
+ res = read_flash_sr(sl) & FLASH_SR_ERROR_MASK;
+ break;
+ case STLINK_FLASH_TYPE_G0:
+ case STLINK_FLASH_TYPE_G4:
res = read_flash_sr(sl) & STM32Gx_FLASH_SR_ERROR_MASK;
+ break;
+ case STLINK_FLASH_TYPE_L0:
+ res = read_flash_sr(sl) & STM32L0_FLASH_SR_ERROR_MASK;
+ default:
+ break;
}
if (res) {
|
Add NETGEAR weak candidate based on wpa-sec founds | @@ -192,8 +192,8 @@ static const char *firstword[] =
"pastel", "perfect", "phobic", "pink", "polite", "precious", "purple",
"quaint", "quick", "quiet",
"rapid", "red", "rocky", "round", "royal", "rustic",
-"shiny", "silent", "silky", "silly", "slow", "smiley", "smiling", "smooth",
-"strong", "sunny", "sweet",
+"savage", "shiny", "silent", "silky", "silly", "slow", "smiley", "smiling",
+"smooth", "strong", "sunny", "sweet",
"tablet", "thirsty", "thoughtful", "tiny",
"uneven", "unusual",
"vanilla", "vast",
|
file_close(): deallocate file descriptor closures.
This fixes a memory leak that was occurring when a file is opened
and then closed. | @@ -925,6 +925,12 @@ closure_function(2, 2, sysreturn, file_close,
}
if (ret == 0) {
+ deallocate_closure(f->f.read);
+ deallocate_closure(f->f.write);
+ deallocate_closure(f->f.sg_read);
+ deallocate_closure(f->f.sg_write);
+ deallocate_closure(f->f.events);
+ deallocate_closure(f->f.close);
release_fdesc(&f->f);
unix_cache_free(get_unix_heaps(), file, f);
}
|
py/emitnative: Simplify viper mode handling in emit_native_import_name. | @@ -1170,32 +1170,16 @@ STATIC void emit_native_import_name(emit_t *emit, qstr qst) {
DEBUG_printf("import_name %s\n", qstr_str(qst));
// get arguments from stack: arg2 = fromlist, arg3 = level
- // if using viper types these arguments must be converted to proper objects
- if (emit->do_viper_types) {
- // fromlist should be None or a tuple
- stack_info_t *top = peek_stack(emit, 0);
- if (top->vtype == VTYPE_PTR_NONE) {
- emit_pre_pop_discard(emit);
- ASM_MOV_REG_IMM(emit->as, REG_ARG_2, (mp_uint_t)mp_const_none);
- } else {
- vtype_kind_t vtype_fromlist;
- emit_pre_pop_reg(emit, &vtype_fromlist, REG_ARG_2);
- assert(vtype_fromlist == VTYPE_PYOBJ);
- }
-
- // level argument should be an immediate integer
- top = peek_stack(emit, 0);
- assert(top->vtype == VTYPE_INT && top->kind == STACK_IMM);
- ASM_MOV_REG_IMM(emit->as, REG_ARG_3, (mp_uint_t)MP_OBJ_NEW_SMALL_INT(top->data.u_imm));
- emit_pre_pop_discard(emit);
-
- } else {
+ // If using viper types these arguments must be converted to proper objects, and
+ // to accomplish this viper types are turned off for the emit_pre_pop_reg_reg call.
+ bool orig_do_viper_types = emit->do_viper_types;
+ emit->do_viper_types = false;
vtype_kind_t vtype_fromlist;
vtype_kind_t vtype_level;
emit_pre_pop_reg_reg(emit, &vtype_fromlist, REG_ARG_2, &vtype_level, REG_ARG_3);
assert(vtype_fromlist == VTYPE_PYOBJ);
assert(vtype_level == VTYPE_PYOBJ);
- }
+ emit->do_viper_types = orig_do_viper_types;
emit_call_with_imm_arg(emit, MP_F_IMPORT_NAME, qst, REG_ARG_1); // arg1 = import name
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
|
Adjust m3_CallWithArgs to be used with spec tests | @@ -403,7 +403,7 @@ M3Result m3_CallWithArgs (IM3Function i_function, i32 i_argc, ccstr_t * i_argv
IM3FuncType ftype = i_function->funcType;
-_ (Module_EnsureMemorySize (module, & i_function->module->memory, 3000000));
+//_ (Module_EnsureMemorySize (module, & i_function->module->memory, 3000000));
u8 * linearMemory = module->memory.wasmPages;
@@ -415,15 +415,17 @@ _ (Module_EnsureMemorySize (module, & i_function->module->memory, 3000000));
_throw("arguments count missmatch");
}
+ // The format is currently not user-friendly,
+ // but it's used in spec tests
for (int i = 0; i < ftype->numArgs; ++i)
{
m3stack_t s = &stack[i];
- ccstr_t* str = i_argv[i];
+ ccstr_t str = i_argv[i];
switch (ftype->argTypes[i]) {
- case c_m3Type_i32: *(i32*)(s) = atol(str); break;
- case c_m3Type_i64: *(i64*)(s) = atoll(str); break;
- case c_m3Type_f32: *(f32*)(s) = atof(str); break;
- case c_m3Type_f64: *(f64*)(s) = atof(str); break;
+ case c_m3Type_i32: *(u32*)(s) = strtoul(str, NULL, 10); break;
+ case c_m3Type_i64: *(u64*)(s) = strtoull(str, NULL, 10); break;
+ case c_m3Type_f32: *(u32*)(s) = strtoul(str, NULL, 10); break;
+ case c_m3Type_f64: *(u64*)(s) = strtoull(str, NULL, 10); break;
default: _throw("unknown argument type");
}
}
@@ -432,10 +434,10 @@ _ (Call (i_function->compiled, stack, linearMemory, d_m3OpDefaultArgs));
switch (ftype->returnType) {
case c_m3Type_none: break;
- case c_m3Type_i32: printf("Result: %ld\n", *(i32*)(stack)); break;
- case c_m3Type_i64: printf("Result: %lld\n", *(i64*)(stack)); break;
- case c_m3Type_f32: printf("Result: %f\n", *(f32*)(stack)); break;
- case c_m3Type_f64: printf("Result: %lf\n", *(f64*)(stack)); break;
+ case c_m3Type_i32: printf("Result: %u\n", *(u32*)(stack)); break;
+ case c_m3Type_i64: printf("Result: %lu\n", *(u64*)(stack)); break;
+ case c_m3Type_f32: printf("Result: %u\n", *(u32*)(stack)); break;
+ case c_m3Type_f64: printf("Result: %lu\n", *(u64*)(stack)); break;
default: _throw("unknown return type");
}
|
fix doc names | @@ -98,8 +98,8 @@ typedef NS_ENUM(NSInteger, ODWSessionState)
/*!
@brief Logs a diagnostic trace event to help you troubleshoot problems.
- @param aLevel The level of the trace as one of the ::ODWTraceLevel enumeration values.
- @param aMessage A string that contains a description of the trace.
+ @param traceLevel The level of the trace as one of the ::ODWTraceLevel enumeration values.
+ @param message A string that contains a description of the trace.
@param properties Properties of the trace event, encapsulated within an ODWEventProperties object.
*/
-(void)logTraceWithTraceLevel:(enum ODWTraceLevel)traceLevel
|
Support loading 16 bit images;
With 1, 2, or 4 channels; | @@ -494,7 +494,26 @@ TextureData* lovrTextureDataInitFromBlob(TextureData* textureData, Blob* blob, b
int width, height;
int length = (int) blob->size;
stbi_set_flip_vertically_on_load(flip);
- if (stbi_is_hdr_from_memory(blob->data, length)) {
+ if (stbi_is_16_bit_from_memory(blob->data, length)) {
+ int channels;
+ textureData->blob->data = stbi_load_16_from_memory(blob->data, length, &width, &height, &channels, 0);
+ switch (channels) {
+ case 1:
+ textureData->format = FORMAT_R16;
+ textureData->blob->size = 2 * width * height;
+ break;
+ case 2:
+ textureData->format = FORMAT_RG16;
+ textureData->blob->size = 4 * width * height;
+ break;
+ case 4:
+ textureData->format = FORMAT_RGBA16;
+ textureData->blob->size = 8 * width * height;
+ break;
+ default:
+ lovrThrow("Unsupported channel count for 16 bit image: %d", channels);
+ }
+ } else if (stbi_is_hdr_from_memory(blob->data, length)) {
textureData->format = FORMAT_RGBA32F;
textureData->blob->data = stbi_loadf_from_memory(blob->data, length, &width, &height, NULL, 4);
textureData->blob->size = 16 * width * height;
|
Bump API version to 1.16.0
Some apps won't work with older API version. | @@ -65,7 +65,7 @@ GIT_COMMIT = $$system("git rev-list HEAD --max-count=1")
# Version Major.Minor.Build
# Important: don't change the format of this line since it's parsed by scripts!
DEFINES += GW_SW_VERSION=\\\"2.05.40\\\"
-DEFINES += GW_API_VERSION=\\\"1.0.9\\\"
+DEFINES += GW_API_VERSION=\\\"1.16.0\\\"
DEFINES += GIT_COMMMIT=\\\"$$GIT_COMMIT\\\" \
# Minimum version of the RaspBee firmware
|
Add ICU support for FindNodeJS on version 18. | @@ -452,6 +452,8 @@ if(NOT NodeJS_LIBRARY)
message(STATUS "Configure NodeJS shared library")
# Select the ICU library depending on the NodeJS version
+ if("${NodeJS_VERSION_MAJOR}" GREATER_EQUAL "18")
+ set(ICU_URL "https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.zip")
if("${NodeJS_VERSION_MAJOR}" GREATER_EQUAL "16")
set(ICU_URL "https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.zip")
elseif("${NodeJS_VERSION_MAJOR}" GREATER_EQUAL "15")
|
Fix support for "which-jobs" = 'fetchable' (Issue
For ippserver, any pending job is fetchable. | @@ -4009,6 +4009,11 @@ ipp_get_jobs(server_client_t *client) /* I - Client */
job_comparison = 0;
job_state = IPP_JSTATE_STOPPED;
}
+ else if (!strcmp(which_jobs, "fetchable") && client->printer->pinfo.proxy_group != SERVER_GROUP_NONE)
+ {
+ job_comparison = 0;
+ job_state = IPP_JSTATE_PENDING;
+ }
else
{
serverRespondIPP(client, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES,
|
Add STM32F412xx to supported CPUs by PWM | @@ -175,7 +175,7 @@ int Library_win_dev_pwm_native_Windows_Devices_Pwm_PwmPin::GetChannel (int pin,
break;
}
#endif
-#if defined(STM32F411xx) || defined(STM32F401xx)
+#if defined(STM32F411xx) || defined(STM32F412xx) || defined(STM32F401xx)
switch (timerId)
{
case 1 :
|
MEMFS: Add actual count to assert statement | @@ -113,7 +113,9 @@ for directory in dirs:
totsize = 0
g.close()
-assert fcount == 3
+# The number of generated C files is hard coded.
+# See memfs/CMakeLists.txt
+assert fcount == 3, fcount
opath = output_file_base + "_final.c"
print('MEMFS: Generating output: ', opath)
g = open(opath, "w")
|
Stop shifting from extending past genome boundaries
When provided with a genome file, shift was still creating
intervals that extended past the last base pair.
See issue | @@ -70,7 +70,7 @@ void BedShift::AddShift(BED &bed) {
if ((bed.end + shift) <= 0)
bed.end = 1;
- else if ((bed.start + shift) > chromSize)
+ else if ((bed.end + shift) > chromSize)
bed.end = chromSize;
else
bed.end = bed.end + shift;
|
IsFlat: use int for thresh
thresh is defined by FLATNESS_LIMIT_* which ranges from 2-10.
score_t is int64 which is a touch overkill. | @@ -977,8 +977,8 @@ static void SwapOut(VP8EncIterator* const it) {
SwapPtr(&it->yuv_out_, &it->yuv_out2_);
}
-static int IsFlat(const int16_t* levels, int num_blocks, score_t thresh) {
- score_t score = 0;
+static int IsFlat(const int16_t* levels, int num_blocks, int thresh) {
+ int score = 0;
while (num_blocks-- > 0) { // TODO(skal): refine positional scoring?
int i;
for (i = 1; i < 16; ++i) { // omit DC, we're only interested in AC
|
improve quat_look | @@ -646,15 +646,12 @@ glm_quat_slerp(versor from, versor to, float t, versor dest) {
CGLM_INLINE
void
glm_quat_look(vec3 eye, versor ori, mat4 dest) {
- CGLM_ALIGN(16) vec4 t;
-
/* orientation */
glm_quat_mat4t(ori, dest);
/* translate */
- glm_vec4(eye, 1.0f, t);
- glm_mat4_mulv(dest, t, t);
- glm_vec_flipsign_to(t, dest[3]);
+ glm_mat4_mulv3(dest, eye, 1.0f, dest[3]);
+ glm_vec_flipsign(dest[3]);
}
/*!
|
Fixing one sentence in photo-z section. | @@ -399,7 +399,7 @@ This function is directly implemented in {\tt CCL} as well as a specific $\sigma
\subsection{Photo-$z$ implementation}
\label{sec:photoz}
-LSST galaxy redshifts will be obtained using photometry. However, analytic forms of galaxy redshift distributions are usually known in terms of spectroscopic redshifts. A model is therefore required for the probability of measuring a particular photometric redshift given a spectroscopic redshift. {\tt CCL} allows you to flexibly provide your own photometric redshift model.
+LSST galaxy redshifts will be obtained using photometry. However, analytic forms of galaxy redshift distributions are usually known in terms of spectroscopic redshifts. A model is therefore required for the probability of measuring a photometric redshift $z_{\rm ph}$ for an object with hypothetical spectroscopic redshift $z_{\rm s}$. {\tt CCL} allows you to flexibly provide your own photometric redshift model.
To do so, you will write a function which accepts as input a photometric redshift, a spectroscopic redshift, and a void pointer to a structure containing any further parameters of your photo-z model. This function will return the probability of measuring the input photometric redshift given the input spectroscopic redshift. Explicitly, this function should take the form:
|
Use cached local variable instead using accessor | @@ -395,7 +395,7 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
cb->pending_subs -= 1;
}
- memcpy(dstcb,dictGetEntryVal(de),sizeof(*dstcb));
+ memcpy(dstcb,cb,sizeof(*dstcb));
/* If this is an unsubscribe message, remove it. */
if (strcasecmp(stype+pvariant,"unsubscribe") == 0) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.