message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Let wifi init not depend on INVOCATION_ID from systemd (not available in Jessie) | @@ -261,14 +261,6 @@ void DeRestPluginPrivate::initWiFi()
return;
}
- // deCONZ is startet from a systemd unit?
- // -- deconz.service or deconz-gui.service
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
- if (!env.contains(QLatin1String("INVOCATION_ID")))
- {
- return;
- }
-
if (gwWifiState == WifiStateInitMgmt)
{
retry = true;
|
do not delay eager commit for the main thread | @@ -579,7 +579,8 @@ static mi_segment_t* mi_segment_init(mi_segment_t* segment, size_t required, mi_
mi_assert_internal(segment_size >= required);
// Initialize parameters
- const bool eager_delayed = (page_kind <= MI_PAGE_MEDIUM && tld->count < (size_t)mi_option_get(mi_option_eager_commit_delay));
+ const bool eager_delayed = (page_kind <= MI_PAGE_MEDIUM && !_mi_is_main_thread() &&
+ tld->count < (size_t)mi_option_get(mi_option_eager_commit_delay));
const bool eager = !eager_delayed && mi_option_is_enabled(mi_option_eager_commit);
bool commit = eager; // || (page_kind >= MI_PAGE_LARGE);
bool pages_still_good = false;
|
Add plugin support for header column totals | @@ -215,6 +215,20 @@ BOOLEAN PhCmForwardMessage(
plugin = column->Plugin;
}
break;
+ case TreeNewGetHeaderText:
+ {
+ PPH_TREENEW_COLUMN tlColumn = Parameter1;
+ PPH_CM_COLUMN column;
+
+ if (tlColumn->Id < Manager->MinId)
+ return FALSE;
+
+ column = tlColumn->Context;
+ pluginMessage.SubId = column->SubId;
+ pluginMessage.Context = column->Context;
+ plugin = column->Plugin;
+ }
+ break;
default:
{
// Some plugins want to be notified about all messages.
|
[kernel] allow unlink() calls outside updateInteractions() to reset OSNS matrices
motivation: removing interactions via collision manager removeBody()
(i.e. remove contact interactions) results in unlink() calls outside
of updateInteractions() that did not trigger updateIndexSets(),
leaving bad references in indexSet(1). | @@ -468,8 +468,7 @@ void Simulation::unlink(SP::Interaction inter)
void Simulation::updateInteractions()
{
// Update interactions if a manager was provided
- if (_interman) {
- _linkOrUnlink = false;
+ if (_interman)
_interman->updateInteractions(shared_from_this());
if (_linkOrUnlink) {
@@ -479,15 +478,14 @@ void Simulation::updateInteractions()
// topology->hasChanged() flag, it must be specified explicitly.
// Otherwise OneStepNSProblem may fail to update its matrices.
_nsds->topology()->setHasChanged(true);
- }
+ _linkOrUnlink = false;
}
}
void Simulation::updateInteractionsNewtonIteration()
{
// Update interactions if a manager was provided
- if (_interman) {
- _linkOrUnlink = false;
+ if (_interman)
_interman->updateInteractionsNewtonIteration(shared_from_this());
if (_linkOrUnlink) {
@@ -497,7 +495,7 @@ void Simulation::updateInteractionsNewtonIteration()
// topology->hasChanged() flag, it must be specified explicitly.
// Otherwise OneStepNSProblem may fail to update its matrices.
_nsds->topology()->setHasChanged(true);
- }
+ _linkOrUnlink = false;
}
}
|
[doc] create-mime.conf.pl improve case handling
make create-mime.conf.pl more resilient to questionable edits
to /etc/mime.types
non-vnd.* subtype takes precedence over vnd.* subtype
(type/subtype, e.g. text/plain)
x-ref:
"lighttpd: does not start with media-types 1.1.0" | @@ -120,7 +120,6 @@ sub add {
}
# non-vnd.* subtype wins over vnd.* subtype
- if ($type eq $have_type) {
my $have_vnd = ($have_subtype =~ /^vnd\./);
if (($subtype =~ /^vnd\./) ^ $have_vnd) {
if ($have_vnd) {
@@ -130,7 +129,6 @@ sub add {
return; # ignore
}
}
- }
print STDERR "Duplicate mimetype: '${extension}' => '${mimetype}' (already have '${have}'), merging to 'application/octet-stream'\n";
set ($extension, 'application/octet-stream');
|
Fix precision of mips dsdot | @@ -41,8 +41,11 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
while(i < n)
{
-
+#if defined(DSDOT)
+ dot += (double)(y[iy] * (double)x[ix] ;
+#else
dot += y[iy] * x[ix];
+#endif
ix += inc_x ;
iy += inc_y ;
i++ ;
|
[cmake] make it possible to compile an individual component as static | @@ -91,11 +91,13 @@ macro(LIBRARY_PROJECT_SETUP)
# and for headers of external libraries
include_directories(${SICONOS_INCLUDE_DIRECTORIES})
- if(NOT BUILD_SHARED_LIBS)
- add_library(${COMPONENT} STATIC ${${COMPONENT}_SRCS})
- else()
+ if(BUILD_SHARED_LIBS AND NOT BUILD_${COMPONENT}_STATIC)
add_library(${COMPONENT} SHARED ${${COMPONENT}_SRCS})
+ else()
+ add_library(${COMPONENT} STATIC ${${COMPONENT}_SRCS})
+ set_property(TARGET ${COMPONENT} PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
+
list(APPEND installed_targets ${COMPONENT})
list(REMOVE_DUPLICATES installed_targets)
set(installed_targets ${installed_targets}
|
Added verbose setting for dis | #include <stdlib.h>
#include <string.h>
-#define DEBUG_TB(...) SV_VERBOSE(1000, __VA_ARGS__)
+#define DEBUG_TB(...) \
+ SV_VERBOSE(((Global_Disambiguator_data_t *)d->so->ctx->disambiguator_data)->verbosity, __VA_ARGS__)
//#define DEBUG_TB(...)
/**
* The lighthouses go in the following order:
@@ -163,10 +164,12 @@ typedef struct {
bool single_60hz_mode;
int light_min_length;
+ int verbosity;
} Global_Disambiguator_data_t;
STRUCT_CONFIG_SECTION(Global_Disambiguator_data_t)
STRUCT_CONFIG_ITEM("light-min-length", "Minimum length of V1 light to accept.", 100, t->light_min_length);
+STRUCT_CONFIG_ITEM("disambiguator-verbosity", "Verbosity of disambiguator", 1000, t->verbosity);
END_STRUCT_CONFIG_SECTION(Global_Disambiguator_data_t)
typedef struct {
@@ -790,7 +793,6 @@ void DisambiguatorStateBased(SurviveObject *so, const LightcapElement *le) {
}
if (so->ctx->disambiguator_data == NULL) {
- DEBUG_TB("Initializing Global Disambiguator Data");
Global_Disambiguator_data_t *d = SV_CALLOC(sizeof(Global_Disambiguator_data_t));
d->ctx = ctx;
ctx->disambiguator_data = d;
@@ -798,7 +800,6 @@ void DisambiguatorStateBased(SurviveObject *so, const LightcapElement *le) {
}
if (so->disambiguator_data == NULL) {
- DEBUG_TB("Initializing Disambiguator Data for TB %d", so->sensor_ct);
Disambiguator_data_t *d = SV_CALLOC(sizeof(Disambiguator_data_t) + sizeof(LightcapElement) * so->sensor_ct);
d->so = so;
so->disambiguator_data = d;
|
roller: don't crash if nonce not in queue | :: print error if there was one
::
~? ?=(%| -.result) [dap.bowl %send-error +.p.result]
+ :: if this nonce was removed from the queue by a
+ :: previous resend-with-higher-gas thread, it's done
+ ::
+ ?. (has:ors:dice sending [address nonce])
+ ~? lverb [dap.bowl %done-sending [address nonce]]
+ `state
=/ =send-tx (got:ors:dice sending [address nonce])
=? sending ?=(%& -.result)
%^ put:ors:dice sending
|
extconf: do not build libgit2 tests or CLI
It takes extra time for something we're not going to use and in at least one
case it looks like the CLI might have some issues linking correctly. | @@ -14,6 +14,8 @@ $CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
$CFLAGS << " -Wall -Wno-comment"
cmake_flags = [ ENV["CMAKE_FLAGS"] ]
+cmake_flags << "-DBUILD_CLI=OFF"
+cmake_flags << "-DBUILD_TESTS=OFF"
cmake_flags << "-DREGEX_BACKEND=builtin"
cmake_flags << "-DUSE_SHA1DC=ON" if with_config("sha1dc")
cmake_flags << "-DUSE_SSH=ON" if with_config("ssh")
|
change macros to be more prover-friendly | @@ -20,12 +20,12 @@ protoop_id_t PROTOOP_ID_FEC_GENERATE_REPAIR_SYMBOLS = { .id = "fec_generate_repa
#define DEFAULT_FEC_SCHEME "xor"
#define for_each_source_symbol(fb, ____ss) \
- for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_source_symbols; ____i++, ____keep = !____keep ) \
- for (____ss = fb->source_symbols[____i] ; ____keep ; ____keep = !____keep)
+ for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_source_symbols; ____i++, ____keep = 1-____keep ) \
+ for (____ss = fb->source_symbols[____i] ; ____keep ; ____keep = 1-____keep)
#define for_each_repair_symbol(fb, ____ss) \
- for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_repair_symbols; ____i++, ____keep = !____keep ) \
- for (____ss = fb->repair_symbols[____i] ; ____keep ; ____keep = !____keep)
+ for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_repair_symbols; ____i++, ____keep = 1-____keep ) \
+ for (____ss = fb->repair_symbols[____i] ; ____keep ; ____keep = 1-____keep)
typedef union {
uint32_t raw;
@@ -178,10 +178,6 @@ static inline void parse_sfpid_frame(source_fpid_frame_t *frame_to_parse, uint8_
frame_to_parse->source_fpid.raw = decode_u32(bytes);
}
-static inline void write_sfpid_frame(source_fpid_frame_t *frame_to_write, uint8_t *bytes) {
- encode_u32(frame_to_write->source_fpid.raw, bytes);
-}
-
// assumes that size if safe
static inline source_symbol_t *malloc_source_symbol(picoquic_cnx_t *cnx, source_fpid_t source_fpid, uint16_t size) {
source_symbol_t *s = (source_symbol_t *) my_malloc(cnx, sizeof(source_symbol_t));
|
baseboard/honeybuns/usb_pd_policy.c: Format with clang-format
BRANCH=none
TEST=none
Tricium: disable | @@ -469,7 +469,8 @@ static int svdm_response_svids(int port, uint32_t *payload)
const uint32_t vdo_dp_modes[1] = {
VDO_MODE_DP(/* Must support C and E. D is required for 2 lanes */
- MODE_DP_PIN_C | MODE_DP_PIN_D | MODE_DP_PIN_E, 0, /* DFP pin
+ MODE_DP_PIN_C | MODE_DP_PIN_D | MODE_DP_PIN_E,
+ 0, /* DFP pin
cfg
supported
*/
|
Release: Update Yan LR error message | @@ -107,10 +107,10 @@ The following section lists news about the [modules](https://www.libelektra.org/
the plugin currently prints an error message that looks like this:
```
- config.yaml:2:1: mismatched input '- ' expecting MAP_END
+ config.yaml:2:1: mismatched input '- ' expecting end of map
- element 2 # Incorrect Indentation!
^^
- config.yaml:2:37: extraneous input 'MAP END' expecting STREAM_END
+ config.yaml:2:37: extraneous input 'end of map' expecting end of document
- element 2 # Incorrect Indentation!
^
```
|
option to turn of consistency check | @@ -496,6 +496,7 @@ int main_twixread(int argc, char* argv[argc])
bool linectr = false;
bool partctr = false;
bool mpi = false;
+ bool check_read = true;
long dims[DIMS];
md_singleton_dims(DIMS, dims);
@@ -515,6 +516,7 @@ int main_twixread(int argc, char* argv[argc])
OPT_SET('L', &linectr, "use linectr offset"),
OPT_SET('P', &partctr, "use partctr offset"),
OPT_SET('M', &mpi, "MPI mode"),
+ OPT_CLEAR('X', &check_read, "no consistency check for number of read acquisitions"),
OPT_INT('d', &debug_level, "level", "Debug level"),
};
@@ -666,7 +668,7 @@ int main_twixread(int argc, char* argv[argc])
}
- if (0 != adcs)
+ if ((0 != adcs) && check_read)
error("Incorrect number of ADCs read! ADC count difference: %d != 0!\n", adcs);
md_free(buf);
|
OpenCanopy: Fix right-click issue | @@ -110,12 +110,7 @@ InternalAppleEventNotification (
Context = NotifyContext;
- //
- // Should not happen but just in case.
- //
- if ((Information->EventType & APPLE_ALL_MOUSE_EVENTS) == 0) {
- return;
- }
+ ASSERT ((Information->EventType & APPLE_ALL_MOUSE_EVENTS) != 0);
EventType = Information->EventData.PointerEventType;
@@ -133,7 +128,7 @@ InternalAppleEventNotification (
if ((EventType & APPLE_EVENT_TYPE_MOUSE_DOWN) != 0) {
if ((EventType & APPLE_EVENT_TYPE_LEFT_BUTTON) != 0) {
Context->PrimaryDown = TRUE;
- } else if ((Information->EventType & APPLE_EVENT_TYPE_RIGHT_BUTTON) != 0) {
+ } else if ((EventType & APPLE_EVENT_TYPE_RIGHT_BUTTON) != 0) {
Context->SecondaryDown = TRUE;
}
} else if ((EventType & APPLE_EVENT_TYPE_MOUSE_UP) != 0) {
|
Remove the dependency of transport_interface.h from BLE. | @@ -18,14 +18,6 @@ afr_set_lib_metadata(IS_VISIBLE "true")
set(src_dir "${CMAKE_CURRENT_LIST_DIR}/src")
set(inc_dir "${CMAKE_CURRENT_LIST_DIR}/include")
set(test_dir "${CMAKE_CURRENT_LIST_DIR}/test")
-if( EXISTS ${AFR_MODULES_DIR}/coreMQTT/source )
- set(transport_interface_dir "${AFR_MODULES_DIR}/coreMQTT/source/interface")
-elseif( EXISTS ${AFR_MODULES_DIR}/coreHTTP/source )
- set(transport_interface_dir "${AFR_MODULES_DIR}/coreHTTP/source/interface")
-else()
- message( FATAL_ERROR "No transport_interface.h exists for this included interface.")
-endif()
-
afr_module_sources(
${AFR_CURRENT_MODULE}
@@ -53,7 +45,6 @@ afr_module_include_dirs(
PUBLIC
"${inc_dir}"
"${AFR_MODULES_DIR}/logging/include"
- "${transport_interface_dir}"
PRIVATE
"${test_dir}"
)
|
downstream: retain the original event mask when injecting the wakeup
event to prevent the subsequent `_mk_event_del` call from trying to
delete the wrong type of event from the underlying event loop. | @@ -451,7 +451,7 @@ int flb_downstream_conn_timeouts(struct mk_list *list)
if (connection->event.status != MK_EVENT_NONE) {
mk_event_inject(connection->evl,
&connection->event,
- MK_EVENT_READ | MK_EVENT_WRITE,
+ connection->event.mask,
FLB_TRUE);
}
|
Changelog note for PR Declare lz_enter_rr_into_zone() static,
it's only used in this file, by fobser. | +20 March 2020: George
+ - Merge PR #198 from fobser: Declare lz_enter_rr_into_zone() static, it's
+ only used in this file.
+
20 March 2020: Wouter
- Merge PR #197 from fobser: Make log_ident_revert_to_default() a
proper prototype.
|
Add default message error level in configuration when no CMAKE_BUILD_TYPE has been defined. | @@ -219,6 +219,8 @@ function(configurations_write config_dir config_path)
set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Debug\"")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Error\"")
+ else()
+ set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Error\"")
endif()
set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n}")
|
Benchmarks: Improve formatting of code | @@ -14,9 +14,11 @@ and run the same benchmarks again.
For running benchmarks you can use on Unix:
+```sh
make benchmark_<filename>_callgrind
+```
-which will run the callgrind tool of Valgrind on it.
+which will run the `callgrind` tool of Valgrind on it.
The old STATISTICS file is no longer used and will be
removed with this commit.
@@ -28,18 +30,24 @@ to generate a file containing the seeds. The number of seeds vary, execute the
`benchmark_opmphm` without parameter to get the number of seeds.
Then execute:
+```sh
cat <fileWithSeeds> | benchmark_opmphm <benchmark>
+```
Example:
To run the OPMPHM build time benchmark you need 2008 seeds.
First generate the seeds:
+```sh
scripts/generate-seeds 2008 mySeedFile
+```
Then pass it to the benchmark:
+```sh
cat mySeedFile | benchmark_opmphm opmphmbuildtime
+```
## plugingetset
|
kiln: bump %base first | vats
:: +resume: restart tracking from upstream
::
+ :: TODO: check whether kelvin is legit
+ ::
++ resume
|= lac=desk
^+ vats
++ bump-many
|= [kel=weft live=(set desk)]
^+ kiln
- =/ liv ~(tap in live)
+ :: ensure %base is always reloaded first
+/ ::
+ =/ liv
+ %+ sort ~(tap in live)
+ |= [a=desk b=desk]
+ ^- ?
+ ?: =(%base a) &
+ ?: =(%base b) |
+ (lte `@`a `@`b)
+ ::
|- ^+ kiln
?~ liv kiln
$(liv t.liv, kiln (bump-one kel i.liv))
|
bisect index error test. | @@ -301,6 +301,37 @@ void bisect_greater_than_last_control_point(CuTest *tc)
TS_END_TRY
}
+void bisect_invalid_index(CuTest *tc)
+{
+ tsBSpline spline = ts_bspline_init();
+ tsDeBoorNet net = ts_deboornet_init();
+ tsError err;
+ tsStatus status;
+
+ TS_TRY(try, status.code, &status)
+ /* Create arbitrary spline. */
+ TS_CALL(try, status.code, ts_bspline_new(
+ 16, 3, 3, TS_OPENED, &spline, &status))
+
+ /* Check index off-by-one. */
+ err = ts_bspline_bisect(&spline, 0.f, 0.f, 0,
+ 4, 1, 50, &net, NULL);
+ CuAssertIntEquals(tc, TS_INDEX_ERROR, err);
+ CuAssertPtrEquals(tc, NULL, net.pImpl);
+
+ /* Check another invalid index. */
+ err = ts_bspline_bisect(&spline, 0.f, 0.f, 0,
+ 8, 1, 50, &net, NULL);
+ CuAssertIntEquals(tc, TS_INDEX_ERROR, err);
+ CuAssertPtrEquals(tc, NULL, net.pImpl);
+ TS_CATCH(status.code)
+ CuFail(tc, status.message);
+ TS_FINALLY
+ ts_bspline_free(&spline);
+ ts_deboornet_free(&net);
+ TS_END_TRY
+}
+
CuSuite* get_bisect_suite()
{
CuSuite* suite = CuSuiteNew();
@@ -309,5 +340,6 @@ CuSuite* get_bisect_suite()
SUITE_ADD_TEST(suite, bisect_compare_with_eval_z_coordinate);
SUITE_ADD_TEST(suite, bisect_less_than_first_control_point);
SUITE_ADD_TEST(suite, bisect_greater_than_last_control_point);
+ SUITE_ADD_TEST(suite, bisect_invalid_index);
return suite;
}
\ No newline at end of file
|
BugID:17956759: Reset supports new version of event API. | #include <string.h>
#include "iot_export.h"
#include "iotx_utils.h"
+#include "iotx_system.h"
#include "awss_reset.h"
#if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */
@@ -43,7 +44,13 @@ void awss_report_reset_reply(void *pcontext, void *pclient, void *mesg)
HAL_Timer_Delete(report_reset_timer);
report_reset_timer = NULL;
- iotx_event_post(IOTX_RESET);
+ iotx_event_post(IOTX_RESET); // for old version of event
+ do { // for new version of event
+ void *cb = NULL;
+ cb = (void *)iotx_event_callback(ITE_AWSS_STATUS);
+ if (cb == NULL) break;
+ ((int (*)(int))cb)(IOTX_RESET);
+ } while (0);
}
static int awss_report_reset_to_cloud()
|
api: change callback prototype in test | @@ -72,10 +72,11 @@ static void signal_init()
signal(SIGTERM, &signal_handler);
}
-static void cb_queue_message(mk_mq_t *queue, void *data, size_t size)
+static void cb_queue_message(mk_mq_t *queue, void *data, size_t size, void *ctx)
{
size_t i;
char *buf;
+ (void) ctx;
(void) queue;
printf("=== cb queue message === \n");
@@ -105,7 +106,7 @@ int main()
}
/* Create a message queue and a callback for each message */
- qid = mk_mq_create(ctx, "/data", cb_queue_message);
+ qid = mk_mq_create(ctx, "/data", cb_queue_message, NULL);
mk_config_set(ctx,
"Listen", API_PORT,
|
proper initialization order __FORCE_COMMIT__ | @@ -145,7 +145,6 @@ namespace {
TSeedStream SS;
inline TDefaultTraits() {
- RNGInitAtForkHandlers();
Reset();
}
@@ -162,7 +161,11 @@ namespace {
}
static inline TDefaultTraits& Instance() {
- return *SingletonWithPriority<TDefaultTraits, 0>();
+ auto res = SingletonWithPriority<TDefaultTraits, 0>();
+
+ RNGInitAtForkHandlers();
+
+ return *res;
}
};
|
sort_sub_list(): fix memory leak | @@ -296,8 +296,14 @@ sort_sub_list (GHolder * h, GSort sort) {
add_sub_item_back (sub_list, h->module, arr[k].metrics);
h->items[i].sub_list = sub_list;
+ sub_list = NULL;
}
+
free (arr);
+ if (sub_list) {
+ delete_sub_list (sub_list);
+ sub_list = NULL;
+ }
}
}
|
Fix static code analysis warning | @@ -336,7 +336,7 @@ int byteskip_cid(bytestream * s)
int bytewrite_cstr(bytestream * s, const char * cstr)
{
- size_t l_cstr = cstr != NULL ? strlen(cstr) : 0;
+ size_t l_cstr = strlen(cstr);
int ret = bytewrite_vint(s, l_cstr);
ret |= bytewrite_buffer(s, cstr, l_cstr);
return ret;
|
[platform][qemu-virt-arm] bootstrap pci from the FDT
Look up the ECAM information out of the device tree and bootstrap the
pci bus with it. | * https://opensource.org/licenses/MIT
*/
#include <arch.h>
+#include <inttypes.h>
#include <lk/err.h>
#include <lk/debug.h>
#include <lk/trace.h>
+#include <dev/bus/pci.h>
#include <dev/interrupt/arm_gic.h>
#include <dev/timer/arm_generic.h>
#include <dev/uart.h>
@@ -98,6 +100,23 @@ static void cpucallback(uint64_t id, void *cookie) {
(*cpu_count)++;
}
+struct pcie_detect_state {
+ uint64_t ecam_base;
+ uint64_t ecam_len;
+ uint8_t bus_start;
+ uint8_t bus_end;
+} pcie_state;
+
+static void pciecallback(uint64_t ecam_base, size_t len, uint8_t bus_start, uint8_t bus_end, void *cookie) {
+ struct pcie_detect_state *state = cookie;
+
+ LTRACEF("ecam base %#llx, len %zu, bus_start %hhu, bus_end %hhu\n", ecam_base, len, bus_start, bus_end);
+ state->ecam_base = ecam_base;
+ state->ecam_len = len;
+ state->bus_start = bus_start;
+ state->bus_end = bus_end;
+}
+
void platform_early_init(void) {
/* initialize the interrupt controller */
arm_gic_init();
@@ -113,6 +132,8 @@ void platform_early_init(void) {
.memcookie = &found_mem,
.cpu = cpucallback,
.cpucookie = &cpu_count,
+ .pcie = pciecallback,
+ .pciecookie = &pcie_state,
};
const void *fdt = (void *)KERNEL_BASE;
@@ -158,6 +179,19 @@ void platform_early_init(void) {
void platform_init(void) {
uart_init();
+ /* detect pci */
+#if ARCH_ARM
+ if (pcie_state.ecam_base > (1ULL << 32)) {
+ // dont try to configure this since we dont have LPAE support
+ printf("PCIE: skipping pci initialization due to high memory ECAM\n");
+ pcie_state.ecam_len = 0;
+ }
+#endif
+ if (pcie_state.ecam_len > 0) {
+ printf("PCIE: initializing pcie with ecam at %#" PRIx64 " found in FDT\n", pcie_state.ecam_base);
+ pci_init_ecam(pcie_state.ecam_base, pcie_state.ecam_len, pcie_state.bus_start, pcie_state.bus_end);
+ }
+
/* detect any virtio devices */
uint virtio_irqs[NUM_VIRTIO_TRANSPORTS];
for (int i = 0; i < NUM_VIRTIO_TRANSPORTS; i++) {
|
also write not replaycount checked handshakes to cap file, because state of the art cracker are able to do nonce-error-corrections | @@ -198,7 +198,7 @@ int p;
for(p = akthccapset +1; p < hccapsets; p++)
{
zeigertest++;
- if((memcmp(zeigertest->mac_ap.addr, zeiger->mac_ap.addr, 6) == 0) && (memcmp(zeigertest->mac_sta.addr, zeiger->mac_sta.addr, 6) == 0))
+ if((memcmp(zeigertest->mac_ap.addr, zeiger->mac_ap.addr, 6) == 0) && (memcmp(zeigertest->mac_sta.addr, zeiger->mac_sta.addr, 6) == 0) && (zeigertest->message_pair == zeiger->message_pair))
return true;
return false;
@@ -219,6 +219,11 @@ if(memcmp(ia->mac_sta.addr, ib->mac_sta.addr, 6) > 0)
return 1;
else if(memcmp(ia->mac_sta.addr, ib->mac_sta.addr, 6) < 0)
return -1;
+if(ia->message_pair > ib->message_pair)
+ return 1;
+else if(ia->message_pair < ib->message_pair)
+ return -1;
+
else return 0;
}
/*===========================================================================*/
@@ -241,13 +246,14 @@ qsort(hccapxdata, hccapsets, sizeof(hcx_t), sort_by_mac12);
zeiger = hccapxdata;
for(p = 0; p < hccapsets; p++)
{
- if(((zeiger->message_pair & 0x80) != 0x80) && (zeiger->message_pair != MESSAGE_PAIR_M32E3) && (zeiger->message_pair != MESSAGE_PAIR_M34E3))
+ if(((zeiger->message_pair &0x80) != MESSAGE_PAIR_M32E3) && ((zeiger->message_pair &0x80) != MESSAGE_PAIR_M34E3))
{
if((mac12checkdouble(zeiger, p, hccapsets) == false))
{
if(memcmp(lasthost, zeiger->mac_ap.addr, 6) == 0)
lasthostcount++;
- else lasthostcount = 1;
+ else
+ lasthostcount = 1;
memcpy(lasthost, zeiger->mac_ap.addr, 6);
if(lasthostcount > maxhostcount)
maxhostcount = lasthostcount;
@@ -274,9 +280,8 @@ lasthostcount = 1;
zeiger = hccapxdata;
for(p = 0; p < hccapsets; p++)
{
- if(((zeiger->message_pair & 0x80) != 0x80) &&
- (zeiger->message_pair != MESSAGE_PAIR_M32E3) &&
- (zeiger->message_pair != MESSAGE_PAIR_M34E3) &&
+ if(((zeiger->message_pair &0x80) != MESSAGE_PAIR_M32E3) &&
+ ((zeiger->message_pair &0x80) != MESSAGE_PAIR_M34E3) &&
(zeiger->eapol_len >= 8) &&
(zeiger->eapol_len <= sizeof(zeiger->eapol)))
{
|
Update pq harness to play nicely with variable LSNs. | @@ -409,10 +409,10 @@ Macros for defining groups of functions that implement various queries and comma
sessionParam, walNameParam, lsnNameParam, targetLsnParam, targetReachedParam, replayLsnParam) \
{.session = sessionParam, \
.function = HRNPQ_SENDQUERY, \
- .param = \
+ .param = strPtr(strNewFmt( \
"[\"select replayLsn::text,\\n" \
- " (replayLsn > '" targetLsnParam "')::bool as targetReached\\n" \
- " from pg_catalog.pg_last_" walNameParam "_replay_" lsnNameParam "() as replayLsn\"]", \
+ " (replayLsn > '%s')::bool as targetReached\\n" \
+ " from pg_catalog.pg_last_" walNameParam "_replay_" lsnNameParam "() as replayLsn\"]", targetLsnParam)), \
.resultInt = 1}, \
{.session = sessionParam, .function = HRNPQ_CONSUMEINPUT}, \
{.session = sessionParam, .function = HRNPQ_ISBUSY}, \
@@ -436,10 +436,10 @@ Macros for defining groups of functions that implement various queries and comma
#define HRNPQ_MACRO_CHECKPOINT_TARGET_REACHED(sessionParam, lsnNameParam, targetLsnParam, targetReachedParam, checkpointLsnParam) \
{.session = sessionParam, \
.function = HRNPQ_SENDQUERY, \
- .param = \
- "[\"select (checkpoint_" lsnNameParam " > '" targetLsnParam "')::bool as targetReached,\\n" \
+ .param = strPtr(strNewFmt( \
+ "[\"select (checkpoint_" lsnNameParam " > '%s')::bool as targetReached,\\n" \
" checkpoint_" lsnNameParam "::text as checkpointLsn\\n" \
- " from pg_catalog.pg_control_checkpoint()\"]", \
+ " from pg_catalog.pg_control_checkpoint()\"]", targetLsnParam)), \
.resultInt = 1}, \
{.session = sessionParam, .function = HRNPQ_CONSUMEINPUT}, \
{.session = sessionParam, .function = HRNPQ_ISBUSY}, \
|
readthedocs: update copyright years | @@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = u'Contiki-NG'
-copyright = u'2018, Contiki-NG maintainers and contributors'
+copyright = u'2018-2022, Contiki-NG maintainers and contributors'
author = u'Contiki-NG maintainers and contributors'
# The short X.Y version
|
No Jira ticket. Fix compile error for bletest. | @@ -115,7 +115,7 @@ bletest_send_ltk_req_reply(uint16_t handle)
return -1;
}
- if (le16toh(ack_conn_handle) != conn_handle) {
+ if (le16toh(ack_conn_handle) != handle) {
return -1;
}
return 0;
|
bugid:24107752:fix comments for krhino | @@ -111,9 +111,7 @@ kstat_t krhino_event_get(kevent_t *event, uint32_t flags, uint8_t opt,
/**
* Set a event
* opt = RHINO_AND: Clear some bit in 'event->flags', 'event->flags' &= 'flags'.
- * opt = RHINO_AND_CLEAR: Same as 'RHINO_AND'
* opt = RHINO_OR: Set some bit in 'event->flags', 'event->flags' |= 'flags', may invoke other waiting task
- * opt = RHINO_OR_CLEAR: Same as 'RHINO_OR'
*
* @param[in] event pointer to a event
* @param[in] flags which users want to be set
|
cmake: keep 'make test-debug' on autotools for now | @@ -21,7 +21,7 @@ STARTUP_DIR?=$(PWD)
MACHINE=$(shell uname -m)
SUDO?=sudo
-ifeq ($(findstring $(MAKECMDGOALS),verify pkg-deb pkg-rpm test),)
+ifeq ($(findstring $(MAKECMDGOALS),verify pkg-deb pkg-rpm test test-debug),)
export vpp_uses_cmake?=yes
endif
|
docs: edits for msr driver load | \begin{center}
\begin{tcolorbox}[]
\small
-By default, OpenHPC ships the Likwid performance analysis toolkit. This package
-requires the MSR driver, which is not enabled on SUSE distributions.
+OpenHPC includes the Likwid performance analysis toolkit in the {\em perf-tools} meta-package. This package
+requires the MSR kernel driver, which is not enabled by default on SUSE distributions. To enable:
% begin_ohpc_run
% ohpc_comment_header
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true]
|
Add some extra output to see clang --version, amdgcn/bitcode dir | # run_epsdb_aomp_test.sh
#
+set -x
export AOMP_GPU=`$AOMP/bin/mygpu`
echo AOMP_GPU = $AOMP_GPU
export EXTRA_OMP_FLAGS=--rocm-path=$AOMP/
+$AOMP/bin/clang --version
+ls $AOMP/amdgcn/bitcode
+
+set +x
cd ../test/smoke
EPSDB=1 ./check_smoke.sh
|
unix/modos: Support larger integer range in uos.stat fields.
On 32-bit builds these stat fields will overflow a small-int, so use
mp_obj_new_int_from_uint to construct the int object. | @@ -63,15 +63,15 @@ STATIC mp_obj_t mod_os_stat(size_t n_args, const mp_obj_t *args) {
mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(10, NULL));
t->items[0] = MP_OBJ_NEW_SMALL_INT(sb.st_mode);
- t->items[1] = MP_OBJ_NEW_SMALL_INT(sb.st_ino);
- t->items[2] = MP_OBJ_NEW_SMALL_INT(sb.st_dev);
- t->items[3] = MP_OBJ_NEW_SMALL_INT(sb.st_nlink);
- t->items[4] = MP_OBJ_NEW_SMALL_INT(sb.st_uid);
- t->items[5] = MP_OBJ_NEW_SMALL_INT(sb.st_gid);
+ t->items[1] = mp_obj_new_int_from_uint(sb.st_ino);
+ t->items[2] = mp_obj_new_int_from_uint(sb.st_dev);
+ t->items[3] = mp_obj_new_int_from_uint(sb.st_nlink);
+ t->items[4] = mp_obj_new_int_from_uint(sb.st_uid);
+ t->items[5] = mp_obj_new_int_from_uint(sb.st_gid);
t->items[6] = mp_obj_new_int_from_uint(sb.st_size);
- t->items[7] = MP_OBJ_NEW_SMALL_INT(sb.st_atime);
- t->items[8] = MP_OBJ_NEW_SMALL_INT(sb.st_mtime);
- t->items[9] = MP_OBJ_NEW_SMALL_INT(sb.st_ctime);
+ t->items[7] = mp_obj_new_int_from_uint(sb.st_atime);
+ t->items[8] = mp_obj_new_int_from_uint(sb.st_mtime);
+ t->items[9] = mp_obj_new_int_from_uint(sb.st_ctime);
return MP_OBJ_FROM_PTR(t);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_os_stat_obj, 1, 2, mod_os_stat);
|
details-gackground typo fix | @@ -53,7 +53,7 @@ The following sizing options can also be set:
*message-padding=<padding>*
Set the padding for the message.
-*details-gackground=<color>*
+*details-background=<color>*
The background color for the details.
*details-border-size=<size>*
|
Changelog note for
Merge PR ifdef RLIMIT_AS in recently added check. | +10 May 2021: Wouter
+ - Merge PR #487: ifdef RLIMIT_AS in recently added check.
+
7 May 2021: Wouter
- Fix #485: Unbound occasionally reports broken stats.
- Add ./configure --with-deprecate-rsa-1024 that turns off RSA 1024.
|
input: on marking buffer write, pass instance context | @@ -454,7 +454,9 @@ static inline void flb_input_buf_write_end(struct flb_input_instance *i)
/* Call the filter handler */
buf = i->mp_sbuf.data + i->mp_buf_write_size;
- flb_filter_do(buf, bytes, i->tag, i->tag_len, i->config);
+ flb_filter_do(i,
+ buf, bytes,
+ i->tag, i->tag_len, i->config);
}
static inline void FLB_INPUT_RETURN()
|
Net: Implement DNS question sending | @@ -311,6 +311,53 @@ void dns_receive(packet_info_t* packet_info, dns_packet_t* packet, uint32_t pack
}
}
+void dns_send(void) {
+ dns_packet_t header = {0};
+ header.identifier = htons(0x4546);
+ /*
+ // TODO(PT): Might need to flip the order of this whole bitfield?
+ header.query_response_flag = 0;
+ header.opcode = 0;
+ header.recursion_desired_flag = 1;
+ */
+ uint16_t* h = (uint16_t*)&header;
+ h[1] = htons(0x0100);
+
+ header.question_count = htons(1);
+
+ dns_question_t question;
+
+ char buf[128];
+ char* buf_ptr = buf;
+ const char* labels[] = {"www", "google", "com", NULL};
+ for (int i = 0; i < 3; i++) {
+ const char* label = labels[i];
+ int len = strlen(label);
+ *(buf_ptr++) = len;
+ for (int j = 0; j < len; j++) {
+ *(buf_ptr++) = label[j];
+ }
+ }
+ *(buf_ptr++) = '\0';
+ // Type: A
+ *(buf_ptr++) = 0x0;
+ *(buf_ptr++) = 0x1;
+ // Class: IN
+ *(buf_ptr++) = 0x0;
+ *(buf_ptr++) = 0x1;
+ int buf_len = buf_ptr - buf;
+ printf("buf len %d\n", buf_len);
+
+ uint32_t dns_packet_size = sizeof(dns_packet_t) + buf_len;
+ char* dns_packet = malloc(dns_packet_size);
+ memcpy(dns_packet, &header, sizeof(dns_packet_t));
+ memcpy(dns_packet + sizeof(dns_packet_t), buf, buf_len);
+
+ uint8_t router_ip[IPv4_ADDR_SIZE];
+ net_copy_router_ipv4_addr(router_ip);
+ udp_send(dns_packet, dns_packet_size, 51303, 53, router_ip);
+}
+
dns_service_type_t* dns_service_type_table(void) {
return _dns_service_type_table;
}
|
inprove USER_PROLOG handling | @@ -40,10 +40,6 @@ cat > $TEMPFILE << EndOfMessage
#define __BUILDINFO_H__
EndOfMessage
-if [ -n "$USER_PROLOG" ]; then
- USER_PROLOG_LINE="$USER_PROLOG"\\n
-fi
-
echo "#define USER_PROLOG \""$USER_PROLOG"\"" >> $TEMPFILE
echo "#define BUILDINFO_BRANCH \""$BRANCH"\"" >> $TEMPFILE
echo "#define BUILDINFO_COMMIT_ID \""$COMMIT_ID"\"" >> $TEMPFILE
@@ -57,7 +53,7 @@ echo "#define BUILDINFO_MODULES \""$MODULES"\"" >> $TEMPFILE
cat >> $TEMPFILE << EndOfMessage2
#define NODE_VERSION_LONG \\
- "$USER_PROLOG_LINE" \\
+ "$USER_PROLOG \n" \\
"\tbranch: " BUILDINFO_BRANCH "\n" \\
"\tcommit: " BUILDINFO_COMMIT_ID "\n" \\
"\trelease: " BUILDINFO_RELEASE "\n" \\
|
INI: Simplify function `isSectionKey` | @@ -436,11 +436,7 @@ static int iniKeyToElektraKey (void * vhandle, const char * section, const char
static short isSectionKey (Key * key)
{
- if (!key) return 0;
- if (keyGetMeta (key, "internal/ini/section"))
- return 1;
- else
- return 0;
+ return key && keyGetMeta (key, "internal/ini/section");
}
static int iniSectionToElektraKey (void * vhandle, const char * section)
|
fixed ptk buffer | @@ -259,7 +259,7 @@ uint8_t pmk[32];
uint8_t pmkin[32];
uint8_t pkedata[102];
uint8_t pkedata_prf[2 + 98 + 2];
-uint8_t ptk[64];
+uint8_t ptk[128];
uint8_t mic[16];
if(hex2bin(pmkname, pmkin, 32) != TRUE)
@@ -267,6 +267,7 @@ if(hex2bin(pmkname, pmkin, 32) != TRUE)
fprintf(stderr, "error wrong plainmasterkey value (allowed: 64 xdigits)\n");
exit(EXIT_FAILURE);
}
+
c = 0;
while(c < hcxrecords)
{
@@ -311,8 +312,6 @@ while(c < hcxrecords)
}
if(memcmp(&mic, zeigerhcx->keymic, 16) == 0)
ausgabe(zeigerhcx, pmkname);
-
-
c++;
}
return;
@@ -328,7 +327,7 @@ uint8_t pmk[32];
uint8_t pmkin[32];
uint8_t pkedata[102];
uint8_t pkedata_prf[2 + 98 + 2];
-uint8_t ptk[64];
+uint8_t ptk[128];
uint8_t mic[16];
unsigned char essid[32];
@@ -405,7 +404,7 @@ uint8_t pmk[32];
uint8_t pmkin[32];
uint8_t pkedata[102];
uint8_t pkedata_prf[2 + 98 + 2];
-uint8_t ptk[64];
+uint8_t ptk[128];
uint8_t mic[16];
unsigned char essid[32];
|
chip/nrf51/gpio.c: Actually check the flag (instead of == 0)
Found by Coverity Scan
BRANCH=none
TEST=none
Tested-by: Patrick Georgi | @@ -257,7 +257,7 @@ int gpio_disable_interrupt(enum gpio_signal signal)
return EC_ERROR_INVAL;
/* If it's not shared, use INT0-INT3, otherwise use PORT. */
- if (!(g->flags && GPIO_INT_SHARED)) {
+ if (!(g->flags & GPIO_INT_SHARED)) {
for (i = 0; i < NRF51_GPIOTE_IN_COUNT; i++) {
/* Remove matching handler. */
if (gpio_ints[i] == g) {
|
METADATA.ini: add range to check/type | @@ -380,7 +380,7 @@ type= enum
FSType
string
status= implemented
-usedby/plugin= type
+usedby/plugin= type, range
description= defines the type of the value, as specified in CORBA
(except of 2: wchar, wstring; and 4 additions: any, empty, FSType, string).
example = any
@@ -405,11 +405,6 @@ usedby/plugin= range
description= range checks, from-to, multiple ranges are separated by a comma
example= 1-10 or -1-4,6-10
-[check/range/type]
-status= implemented
-usedby/plugin= range
-description= type of range (INT, FLOAT, HEX or CHAR)
-
[check/math]
type= string
status = implemented
|
libcupsfilters: When normalizing printer model name replace '+' by "plus" | @@ -1100,6 +1100,16 @@ ieee1284NormalizeMakeAndModel(
*bufptr = sepchr;
rightsidemoved += 1;
}
+ else if (*bufptr == '+') /* Model names sometimes differ only by a '+' */
+ {
+ /* Replace with the word "plus" */
+ moverightpart(buffer, bufsize, bufptr, 3);
+ *bufptr = 'p';
+ *(bufptr + 1) = 'l';
+ *(bufptr + 2) = 'u';
+ *(bufptr + 3) = 's';
+ rightsidemoved += 3;
+ }
else if (!isalnum(*bufptr)) /* Space or punctuation character */
{
if (bufptr == buffer || !isalnum(*(bufptr - 1)))
|
Simplify d2h_slow_copy | #include <omp.h>
-#include <math.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
#include <chrono>
+#include <memory>
#define N 30000
@@ -42,7 +40,7 @@ struct timer {
};
int main() {
- float *arr = (float*)malloc(sizeof(float) * N * N);
+ int *arr = new int[N*N];
timer stopwatch("main()");
#pragma omp target
@@ -59,7 +57,7 @@ int main() {
for (int i = 0; i < N; i++) {
#pragma omp parallel for
for (int j = 0; j < N; j++) {
- arr[i*N + j] = sqrt((i * j) & 0xfffff);
+ arr[i*N + j] = i + j;
}
}
@@ -69,16 +67,15 @@ int main() {
stopwatch.checkpoint("Device to host");
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++) {
- float expected = (i * j) & 0xfffff;
- float val = arr[i *N + j];
- if (round(val * val) != (float)expected) {
- printf("ERROR at (%d, %d) = %f != %f\n", i, j, val * val, (float)(expected));
- exit(1);
+ if (arr[i*N + j] != i+j) {
+ fprintf(stderr, "arr[%d*%d + %d] != %d+%d (%d != %d)\n", i, N, j, i, j, arr[i*N+j], i+j);
+ delete[] arr;
+ return 1;
}
}
stopwatch.checkpoint("Results verified");
printf("Done\n");
- free(arr);
+ delete[] arr;
return 0;
}
|
finished migartion from -m 15800 to -m 2500 and -m 2501 | @@ -86,7 +86,12 @@ if(((hcxrecord->keyver & 0x3) == 1) || ((hcxrecord->keyver & 0x3) == 2))
}
else if((hcxrecord->keyver & 0x3) == 3)
{
- generatepkeprf(hcxrecord, pke_ptr);
+ pke_ptr[0] = 1;
+ pke_ptr[1] = 0;
+ pke_ptr[100] = 0x80;
+ pke_ptr[101] = 1;
+
+ generatepkeprf(hcxrecord, pke_ptr +2);
}
else
{
|
analysis workflow, add arm64 iOS test. | @@ -49,12 +49,21 @@ jobs:
# os: ubuntu-latest
# config: 'CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" --disable-flto --disable-static'
# make_test: "yes"
- - name: Apple iPhone on iOS, armv7
+# - name: Apple iPhone on iOS, armv7
+# os: macos-latest
+# AUTOTOOLS_HOST: armv7-apple-ios
+# OPENSSL_HOST: ios-cross
+# IOS_SDK: iPhoneOS
+# IOS_CPU: armv7s
+# test_ios: "yes"
+# config: "no"
+# make: "no"
+ - name: Apple iPhone on iOS, arm64
os: macos-latest
- AUTOTOOLS_HOST: armv7-apple-ios
- OPENSSL_HOST: ios-cross
+ AUTOTOOLS_HOST: aarch64-apple-ios
+ OPENSSL_HOST: ios64-cross
IOS_SDK: iPhoneOS
- IOS_CPU: armv7s
+ IOS_CPU: arm64
test_ios: "yes"
config: "no"
make: "no"
|
CDRIVER-2000 Disable GSSAPI tests for now | @@ -6346,8 +6346,7 @@ buildvariants:
- "debug-compile"
- "debug-compile-nosasl-openssl"
- ".debug-compile !.sspi .nossl"
- - ".authentication-tests .sasl"
- #- ".authentication-tests !.ssl" FIXME: Kerberos authentication doesn't seem to work
+ - ".authentication-tests .nosasl !.ssl" # Revert me: CDRIVER-2000
- ".authentication-tests .openssl"
- ".latest .nossl" # No MongoDB SSL builds available for any version
- ".3.4 .nossl" # No MongoDB SSL builds available for any version
@@ -6414,7 +6413,7 @@ buildvariants:
- ".debug-compile !.sspi .openssl"
- ".debug-compile !.sspi .nossl"
- ".debug-compile .sspi"
- - ".authentication-tests .sasl" # GSSAPI isn't installed
+ - ".authentication-tests .nosasl !.ssl" # Revert Me: CDRIVER-2040
- ".authentication-tests .openssl"
- ".authentication-tests .winssl"
- ".latest .winssl !.nosasl .server"
@@ -6589,8 +6588,7 @@ buildvariants:
- "debug-compile"
- ".debug-compile !.sspi .openssl"
- ".debug-compile !.sspi .nossl"
- - ".authentication-tests .sasl"
- #- ".authentication-tests !.ssl" FIXME: Kerberos Authentication doesn't seem to work
+ - ".authentication-tests .nosasl !.ssl" # Revert me: CDRIVER-2000
- ".authentication-tests .openssl"
- ".latest .openssl !.nosasl .server"
- ".latest .nossl !.nosasl"
|
common/timer.c: Format with clang-format
BRANCH=none
TEST=none | #ifdef CONFIG_ZEPHYR
#include <zephyr/kernel.h> /* For k_usleep() */
#else
-extern __error("k_usleep() should only be called from Zephyr code")
-int32_t k_usleep(int32_t);
+extern __error("k_usleep() should only be called from Zephyr code") int32_t
+ k_usleep(int32_t);
#endif /* CONFIG_ZEPHYR */
#ifdef CONFIG_COMMON_RUNTIME
@@ -82,7 +82,6 @@ void process_timers(int overflow)
/* read atomically the current state of timer running */
check_timer = running_t0 = timer_running;
while (check_timer) {
-
int tskid = __fls(check_timer);
/* timer has expired ? */
if (timer_deadline[tskid].val <= now.val)
@@ -299,8 +298,7 @@ void __hw_clock_source_set(uint32_t ts)
void timer_print_info(void)
{
timestamp_t t = get_time();
- uint64_t deadline = (uint64_t)t.le.hi << 32 |
- __hw_clock_event_get();
+ uint64_t deadline = (uint64_t)t.le.hi << 32 | __hw_clock_event_get();
int tskid;
ccprintf("Time: 0x%016llx us, %11.6lld s\n"
@@ -384,8 +382,7 @@ static int command_wait(int argc, char **argv)
return EC_SUCCESS;
}
/* Typically a large delay (e.g. 3s) will cause a reset */
-DECLARE_CONSOLE_COMMAND(waitms, command_wait,
- "msec",
+DECLARE_CONSOLE_COMMAND(waitms, command_wait, "msec",
"Busy-wait for msec (large delays will reset)");
#endif
@@ -416,8 +413,7 @@ static int command_force_time(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(forcetime, command_force_time,
- "hi lo",
+DECLARE_CONSOLE_COMMAND(forcetime, command_force_time, "hi lo",
"Force current time");
#endif
@@ -429,8 +425,7 @@ static int command_get_time(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(gettime, command_get_time,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(gettime, command_get_time, NULL,
"Print current time");
#endif
@@ -441,7 +436,6 @@ static int command_timer_info(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(timerinfo, command_timer_info,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(timerinfo, command_timer_info, NULL,
"Print timer info");
#endif
|
fix toggleoverlay | @@ -2177,12 +2177,12 @@ motionnotify(XEvent *e)
}
// toggle overlay gesture
- if (ev->y_root == 0 && ev->x_root >= selmon->mx + selmon->ww + - 20 - getsystraywidth()) {
+ if (ev->y_root == 0 && ev->x_root >= selmon->mx + selmon->ww - 20 - getsystraywidth()) {
if (selmon->gesture != 11) {
selmon->gesture = 11;
setoverlay();
- return;
}
+ return;
} else if (selmon->gesture == 11 && ev->x_root >= selmon->mx + selmon->ww - 24 - getsystraywidth()) {
selmon->gesture = 0;
return;
|
Configurations/15-android.conf: detect NDK llvm-ar.
This excluses user from additional PATH adjustments in case NDK has
llvm-ar. | . "/$tritools-4.9/prebuilt/$host";
$user{CC} = "clang" if ($user{CC} !~ m|clang|);
$user{CROSS_COMPILE} = undef;
+ if (which("llvm-ar") =~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
+ $user{AR} = "llvm-ar";
+ $user{ARFLAGS} = [ "rs" ];
+ $user{RANLIB} = ":";
+ }
} elsif (-f "$ndk/AndroidVersion.txt") { #"standalone toolchain"
my $cc = $user{CC} // "clang";
# One can probably argue that both clang and gcc should be
|
fix typo in `installation.rst` | @@ -22,7 +22,7 @@ Downloading a pre-compiled binary
.. note::
1. The following approach will only work for Linux (non-OSX) systems.
-Starting with release 2.28.0, wqe provide statically-linked binaries thast should work
+Starting with release 2.28.0, we provide statically-linked binaries thast should work
right away on Linux systems. Go to the `releases <https://github.com/arq5x/bedtools2/releases>`_
page and look for the static binary named `bedtools.static.binary`. Right click on it, get the URL, then download it
with `wget` or `curl` and you should be good to go.
|
WIP: ASM Update Actor set initial frame | @@ -39,10 +39,6 @@ _UpdateActors_b::
handle_pinned:
- ; load pos y push to stack
- ; load pos x push to stack
- ; jp move_sprite_pair
-
; Load current pos in de (only lowest bytes)
pop hl
push hl
@@ -141,6 +137,33 @@ _UpdateActors_b::
handle_rerender:
+ pop hl
+ push hl
+
+ ; Get sprite index into c
+ ld a, #9
+ _add_a h, l
+ ld c, (hl)
+
+ ; Get tile_index into b
+ dec hl
+ ld a, (hl)
+ add a, a
+ add a, a
+ ld b, a
+
+ ; Set sprite tile left b=tile_index c=sprite_index
+ push bc
+ call _set_sprite_tile
+ pop bc
+
+ ; Set sprite tile right
+ inc b
+ inc b
+ inc c
+ push bc
+ call _set_sprite_tile
+ add sp, #2
skip_rerender:
|
Add special cases for %da and %ta to +slaw
+slav calls +slaw with %da and %ta in several places across multiple
vanes. This refactors the date parsing code into its own arm so it
can be called from +slaw. | ++ crub
~+
;~ pose
- %+ cook
- |=(det/date `dime`[%da (year det)])
- ;~ plug
- %+ cook
- |=({a/@ b/?} [b a])
- ;~(plug dim:ag ;~(pose (cold | hep) (easy &)))
- ;~(pfix dot mot:ag) :: month
- ;~(pfix dot dip:ag) :: day
- ;~ pose
- ;~ pfix
- ;~(plug dot dot)
- ;~ plug
- dum:ag
- ;~(pfix dot dum:ag)
- ;~(pfix dot dum:ag)
- ;~(pose ;~(pfix ;~(plug dot dot) (most dot qix:ab)) (easy ~))
- ==
- ==
- (easy [0 0 0 ~])
- ==
- ==
+ (cook |=(det/date `dime`[%da (year det)]) when)
::
%+ cook
|= {a/(list {p/?($d $h $m $s) q/@}) b/(list @)}
(stag %$ crub)
==
::
+ ++ when
+ ~+
+ ;~ plug
+ %+ cook
+ |=({a/@ b/?} [b a])
+ ;~(plug dim:ag ;~(pose (cold | hep) (easy &)))
+ ;~(pfix dot mot:ag) :: month
+ ;~(pfix dot dip:ag) :: day
+ ;~ pose
+ ;~ pfix
+ ;~(plug dot dot)
+ ;~ plug
+ dum:ag
+ ;~(pfix dot dum:ag)
+ ;~(pfix dot dum:ag)
+ ;~(pose ;~(pfix ;~(plug dot dot) (most dot qix:ab)) (easy ~))
+ ==
+ ==
+ (easy [0 0 0 ~])
+ ==
+ ==
+ ::
++ zust
~+
;~ pose
::
=+ con=(slay txt)
?.(&(?=({~ $$ @ @} con) =(p.p.u.con mod)) ~ [~ q.p.u.con])
+ ::
+ %da
+ (rush txt ;~(pfix sig (cook year when:so)))
::
%p
(rush txt ;~(pfix sig fed:ag))
::
%uv
(rush txt ;~(pfix (jest '0v') viz:ag))
+ ::
+ %ta
+ (rush txt ;~(pfix ;~(plug sig dot) urs:ab))
::
%tas
(rush txt sym)
|
Compare `FOR` ranges to Python's `range` | @@ -1734,7 +1734,9 @@ N = 256
.Pp
You can customize the range of
.Ic FOR
-values:
+values, similarly to Python's
+.Ql range
+function:
.Bl -column "FOR V, start, stop, step"
.It Sy Code Ta Sy Range
.It Ic FOR Ar V , stop Ta Ar V No increments from 0 to Ar stop
|
Remove duplicate uart0 node. | status = "okay";
};
-&uart0 {
- compatible = "nordic,nrf-uart";
- current-speed = <115200>;
- tx-pin = <6>;
- rx-pin = <8>;
-};
-
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
|
out_syslog: adjust test formatter callback params | @@ -940,6 +940,7 @@ static int cb_syslog_format_test(struct flb_config *config,
struct flb_input_instance *ins,
void *plugin_context,
void *flush_ctx,
+ int event_type,
const char *tag, int tag_len,
const void *data, size_t bytes,
void **out_data, size_t *out_size)
|
feat(common.h): add u64_bitmask_t | @@ -16,6 +16,7 @@ extern "C" {
* its purpose is to facilitate identification
* and "intent of use".
* @{ */
+
/**
* @brief Unix time in milliseconds
*/
@@ -26,6 +27,15 @@ typedef uint64_t u64_unix_ms_t;
* Used in APIs such as Twitter and Discord for their unique IDs
*/
typedef uint64_t u64_snowflake_t;
+
+/**
+ * @brief Bitmask primitive
+ *
+ * Used for fields that may store be used to store values of, or perform
+ * bitwise operations
+ */
+typedef uint64_t u64_bitmask_t;
+
/**
* @brief Raw JSON string
*
@@ -34,6 +44,7 @@ typedef uint64_t u64_snowflake_t;
* parsed with the assistance of a JSON library.
*/
typedef char json_char_t;
+
/** @} OrcaTypes */
/** @defgroup OrcaCodes
|
apps/pkcs12: Do not assume null termination of ASN1_UTF8STRING | @@ -1142,7 +1142,8 @@ void print_attribute(BIO *out, const ASN1_TYPE *av)
break;
case V_ASN1_UTF8STRING:
- BIO_printf(out, "%s\n", av->value.utf8string->data);
+ BIO_printf(out, "%.*s\n", av->value.utf8string->length,
+ av->value.utf8string->data);
break;
case V_ASN1_OCTET_STRING:
|
Add patch functionality to ldscope
allows explicitly patching 'libscope.so'
don't patch libscope.so if `lib/ld-musl-*.so.1` is present but
the default loader is `ld-linux.so` e.g.: Ubuntu with installed
`musl` package | @@ -114,11 +114,10 @@ setEnvVariable(char *env, char *value)
// modify NEEDED entries in libscope.so to avoid dependencies
static int
-set_library(void)
+set_library(const char* libpath)
{
int i, fd, found, name;
struct stat sbuf;
- const char *libpath;
char *buf;
Elf64_Ehdr *elf;
Elf64_Shdr *sections;
@@ -127,7 +126,8 @@ set_library(void)
const char *strtab = NULL;
const char *sec_name = NULL;
- if ((libpath = libdirGetLibrary()) == NULL) return -1;
+ if (libpath == NULL)
+ return -1;
if ((fd = open(libpath, O_RDONLY)) == -1) {
perror("set_library:open");
@@ -403,7 +403,7 @@ do_musl(char *exld, char *ldscope)
}
set_loader(ldscope);
- set_library();
+ set_library(libdirGetLibrary());
if (ldso) free(ldso);
if (lpath) free(lpath);
@@ -433,6 +433,19 @@ setup_loader(char *exe, char *ldscope)
return ret;
}
+static int
+patch_library(const char* so_path) {
+ int result = EXIT_FAILURE;
+
+ char *ldso = get_loader(EXE_TEST_FILE);
+ if (ldso && strstr(ldso, LIBMUSL) != NULL) {
+ result = set_library(optarg);
+ }
+ free(ldso);
+
+ return result;
+}
+
/*
* This avoids a segfault when code using shm_open() is compiled statically.
* For some reason, compiling the code statically causes the __shm_directory()
@@ -892,6 +905,7 @@ showUsage(char *prog)
" -l, --libbasedir DIR specify parent for the library directory (default: /tmp)\n"
" -f DIR alias for \"-l DIR\" for backward compatibility\n"
" -a, --attach PID attach to the specified process ID\n"
+ " -p, --patch SO_FILE patch specified libscope.so \n"
"\n"
"Help sections are OVERVIEW, CONFIGURATION, METRICS, EVENTS, and PROTOCOLS.\n"
"\n"
@@ -912,6 +926,7 @@ static struct option opts[] = {
{ "help", optional_argument, 0, 'h' },
{ "attach", required_argument, 0, 'a' },
{ "libbasedir", required_argument, 0, 'l' },
+ { "patch", required_argument, 0, 'p' },
{ 0, 0, 0, 0 }
};
@@ -932,7 +947,7 @@ main(int argc, char **argv, char **env)
// The initial `:` lets us handle options with optional values like
// `-h` and `-h SECTION`.
//
- int opt = getopt_long(argc, argv, "+:uh:a:l:f:", opts, &index);
+ int opt = getopt_long(argc, argv, "+:uh:a:l:f:p:", opts, &index);
if (opt == -1) {
break;
}
@@ -955,6 +970,8 @@ main(int argc, char **argv, char **env)
case 'l':
libdirSetBase(optarg);
break;
+ case 'p':
+ return patch_library(optarg);
case ':':
// options missing their value end up here
switch (optopt) {
|
os/arch/arm/src/stm32l4/stm32l4_idle.c: align to STM coding rule | @@ -224,8 +224,7 @@ static void up_idlepm(void)
#ifdef CONFIG_STM32L4_RTC
/* Read RTC time after wakeup */
stm32l4_rtc_getdatetime_with_subseconds(&tp2, &ns2);
- time_intval = SEC2TICK(mktime(&tp2) - mktime(&tp1))
- + NSEC2TICK(ns2 - ns1);
+ time_intval = SEC2TICK(mktime(&tp2) - mktime(&tp1)) + NSEC2TICK(ns2 - ns1);
/* Update ticks */
g_system_timer += time_intval;
uwTick += TICK2MSEC(time_intval);
|
zork: enable usb-c FRSwap
Enabling FRSwap and removed the TODOs for enabling
TCPMv2 and FRSwap.
BRANCH=none
TEST=make buildall -j | */
#define CONFIG_USB_PID 0x5040
-#if 1
-/* TODO(b/142284905): Enable the TCPMv2 PD stack */
+/* Enable the TCPMv2 PD stack */
#define CONFIG_USB_PE_SM
#define CONFIG_USB_PRL_SM
#define CONFIG_USB_SM_FRAMEWORK
#define CONFIG_USB_TYPEC_SM
#define CONFIG_USB_TYPEC_DRP_ACC_TRYSRC
-#if 0
- /* TODO(b/146393213): Enable Fast Role Swap */
+
+ /* Enable TCPMv2 Fast Role Swap */
#define CONFIG_USB_TYPEC_PD_FAST_ROLE_SWAP
-#endif
-#endif
#define CONFIG_CMD_PD_CONTROL
#define CONFIG_USB_CHARGER
|
rune: add -lsgx_urts in LDFLAGS
The latest sgx_dcap_quoteverify library lacks symbols which are
defined in sgx_urts library. | package dcap // import "github.com/inclavare-containers/rune/libenclave/attestation/internal/sgx/dcap"
/*
-#cgo LDFLAGS: -lsgx_dcap_quoteverify
+#cgo LDFLAGS: -lsgx_dcap_quoteverify -lsgx_urts
#include <stdio.h>
#include <stdlib.h>
|
Fix preview when hovering on text dialogue events | @@ -9,6 +9,7 @@ import { useDispatch, useSelector } from "react-redux";
import entityActions from "store/features/entities/entitiesActions";
import { RootState } from "store/configureStore";
import { scriptEventSelectors } from "store/features/entities/entitiesState";
+import editorActions from "store/features/editor/editorActions";
import { ScriptEventsRef } from "store/features/entities/entitiesTypes";
import { EVENT_COMMENT, EVENT_END } from "lib/compiler/eventTypes";
import AddButton from "./AddButton";
@@ -25,6 +26,7 @@ import { FixedSpacer } from "ui/spacing/Spacing";
import ScriptEventForm from "./ScriptEventForm2";
import l10n from "lib/helpers/l10n";
import events from "lib/events";
+import { ScriptEditorEventHelper } from "./ScriptEditorEventHelper";
interface ScriptEditorEventProps {
id: string;
@@ -189,6 +191,14 @@ const ScriptEditorEvent = ({
[entityId, id, nestLevel, scriptEvent?.children]
);
+ const onMouseEnter = useCallback(() => {
+ dispatch(editorActions.selectScriptEvent({ eventId: id }));
+ }, [dispatch, id]);
+
+ const onMouseLeave = useCallback(() => {
+ dispatch(editorActions.selectScriptEvent({ eventId: "" }));
+ }, [dispatch]);
+
if (!scriptEvent) {
return null;
}
@@ -226,6 +236,8 @@ const ScriptEditorEvent = ({
return (
<ScriptEventWrapper
+ onMouseEnter={onMouseEnter}
+ onMouseLeave={onMouseLeave}
style={{
height: isDragging ? 0 : "auto",
display: isDragging ? "none" : "block",
@@ -274,6 +286,7 @@ const ScriptEditorEvent = ({
onClick={toggleOpen}
/>
)}
+ <ScriptEditorEventHelper event={scriptEvent} />
<ScriptEventForm
id={id}
entityId={entityId}
|
icheck: increment version | @@ -10,7 +10,7 @@ BASE_DIR="$(pwd)"
BUILD_DIR="$BASE_DIR/build"
ICHECK_DIR="$BASE_DIR/icheck"
-CMPVERSION="0.9.2"
+CMPVERSION="0.9.3"
# XXX: updates here require update in doc/VERSION.md
FILES="src/include/kdbmeta.h src/include/kdbease.h src/include/kdbmerge.h src/include/kdbmodule.h src/include/kdbnotification.h src/include/kdbplugin.h src/plugins/doc/doc.h src/include/kdbopts.h"
|
[ChangeLog] continue to update ChangeLog | @@ -25,7 +25,9 @@ before it.
v4.1.0 (in development branch siconos/master)
--------------------------------------------------------------------------------
Main changes:
- * [kernel]
+ * [kernel] refactoring the initialization of classes
+ lazy initialization driven by the simulation classes.
+ move of buffer and work vectors and matrices towards the graph
* [numerics] optimization of existing frictional contact solvers.
Especially, the semismooth Newton solvers are optimized with respect to the rho
@@ -39,6 +41,14 @@ Main changes:
* [numerics] new solvers for frictional contact problems based on the Panagiotopoulos
approach (alternating normal and tangent problems)
+ * [numerics] update and correct global friction contact solvers.
+ new gfc3d_VI_* solvers. Update lmgc_driver for gfc3d
+
+ * [kernel] new implementation of MoreauJeanGOSI.
+
+ * [numerics] add functionalities and test in NumericsMatrix for sparse storage
+
+
|
cd to tmp_dir first | @@ -112,6 +112,7 @@ foreach my $distro (@distros) {
foreach my $arch (@arches) {
my $dist_filename = "$dest_dir/OpenHPC-$release.$distro\_$arch.tar";
my $tar_args = "-cvf $dist_filename \\\n";
+ $tar_args .= "--cd $tmp_dir \\\n";
# exclude other arches, iso and src dirs
my @n_arches = grep { $_ ne $arch } @arches;
@@ -145,6 +146,7 @@ foreach my $distro (@distros) {
# generate src tarball
my $src_filename = "$dest_dir/OpenHPC-$release.$distro\_src.tar";
my $tar_args = "-cvf $src_filename \\\n";
+ $tar_args .= "--cd $tmp_dir \\\n";
for my $arch (@arches) {
$tar_args .= "--exclude $tmp_dir/$distro/$arch \\\n";
}
|
haskell-debian-stretch: add release notes | @@ -174,6 +174,8 @@ Many problems were resolved with the following fixes:
- We fixed [internal inconsistency](https://github.com/ElektraInitiative/libelektra/pull/1761) in the CMake code of the [Augeas plugin](https://www.libelektra.org/plugins/augeas)
- We fixed various small bugs that could potentially cause the INI plugin to crash
- The INI plugin now [converts a section to a normal key-value pair](https://github.com/ElektraInitiative/libelektra/issues/1793) if you store a value inside it. This has the advantage that you will not [lose data unexpectedly anymore](https://github.com/ElektraInitiative/libelektra/issues/1697).
+- We fixed the [haskell bindings and plugins on Debian Stretch](https://github.com/ElektraInitiative/libelektra/pull/1787)
+ and added a [new build server job](https://build.libelektra.org/job/elektra-haskell/) to test that in the future.
## Outlook
|
BugID:22083675:add VERSION for cmsis_nn component | NAME := cmsis_nn
+
$(NAME)_TYPE := third_party
+$(NAME)_VERSION := 1.0.1
+
GLOBAL_INCLUDES += \
CMSIS_5/CMSIS/Core/Include \
CMSIS_5/CMSIS/DSP/Include \
|
build: conditional build for legacy OS | @echo off
+:: In order to enable legacy OS builds use on build machine
+:: set VIRTIO_WIN_BUILD_LEGACY=win7
+:: set VIRTIO_WIN_BUILD_LEGACY=Win7,wlh (currently does not work)
+:: set VIRTIO_WIN_BUILD_LEGACY=Win7,wlh,wxp,wnet (currently does not work)
+
if "%VIRTIO_WIN_NO_ARM%"=="" call tools\build.bat virtio-win.sln Win10 ARM64
if errorlevel 1 goto :fail
-if "%VIRTIO_WIN_NO_LEGACY%"=="" call tools\build.bat virtio-win.sln "Wxp Wnet Wlh Win7" %*
+
+for %%a in (Win7 Wxp Wnet Wlh) do (
+ echo %VIRTIO_WIN_BUILD_LEGACY% | findstr /i %%a
+ if not errorlevel 1 (
+ call tools\build.bat virtio-win.sln "%%a" %*
if errorlevel 1 goto :fail
+ )
+)
+
call tools\build.bat virtio-win.sln "Win8 Win8.1 Win10" %*
if errorlevel 1 goto :fail
call tools\build.bat NetKVM\NetKVM-VS2015.vcxproj "Win10_SDV" %*
|
Improve system uptime precision | * System Information CPU section
*
* Copyright (C) 2011-2016 wj32
- * Copyright (C) 2017-2020 dmex
+ * Copyright (C) 2017-2021 dmex
*
* This file is part of Process Hacker.
*
@@ -846,7 +846,13 @@ VOID PhSipUpdateCpuPanel(
NULL
)))
{
- PhPrintTimeSpan(uptimeString, timeOfDayInfo.CurrentTime.QuadPart - timeOfDayInfo.BootTime.QuadPart, PH_TIMESPAN_DHMS);
+ LARGE_INTEGER bootTime;
+
+ bootTime.LowPart = timeOfDayInfo.BootTime.LowPart;
+ bootTime.HighPart = timeOfDayInfo.BootTime.HighPart;
+ bootTime.QuadPart -= timeOfDayInfo.BootTimeBias;
+
+ PhPrintTimeSpan(uptimeString, timeOfDayInfo.CurrentTime.QuadPart - bootTime.QuadPart, PH_TIMESPAN_DHMS);
}
PhSetWindowText(CpuPanelUptimeLabel, uptimeString);
|
Do not use _Bool for boolean types, use int instead. | @@ -42,8 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdbool.h>
#else
#ifndef __cplusplus
-typedef int _Bool;
-#define bool _Bool
+#define bool int
#define true 1
#define false 0
#endif /* __cplusplus */
|
ensure that there is no time underflow in picoquic_prepare_segment | @@ -2881,7 +2881,7 @@ int picoquic_prepare_segment(picoquic_cnx_t* cnx, picoquic_path_t ** path, picoq
/* Check that the connection is still alive -- the timer is asymmetric, so client will drop faster */
if ((cnx->cnx_state < picoquic_state_disconnecting &&
- (current_time - cnx->latest_progress_time) >= (PICOQUIC_MICROSEC_SILENCE_MAX*(2 - cnx->client_mode))) ||
+ current_time >= cnx->latest_progress_time && (current_time - cnx->latest_progress_time) >= (PICOQUIC_MICROSEC_SILENCE_MAX*(2 - cnx->client_mode))) ||
(cnx->cnx_state < picoquic_state_client_ready &&
current_time >= cnx->start_time + PICOQUIC_MICROSEC_HANDSHAKE_MAX))
{
|
Fix coverity complaint about commit
The coverity complained that dividing integer expressions and then
converting the integer quotient to type "double" would lose fractional
part. Typecasting one of the arguments of expression with double should
fix the report.
Author: Mahendra Singh Thalor
Discussion: | @@ -2077,7 +2077,7 @@ compute_parallel_delay(void)
VacuumCostBalanceLocal += VacuumCostBalance;
if ((shared_balance >= VacuumCostLimit) &&
- (VacuumCostBalanceLocal > 0.5 * (VacuumCostLimit / nworkers)))
+ (VacuumCostBalanceLocal > 0.5 * ((double) VacuumCostLimit / nworkers)))
{
/* Compute sleep time based on the local cost balance */
msec = VacuumCostDelay * VacuumCostBalanceLocal / VacuumCostLimit;
|
Posix: Removed unused signal set from port | @@ -93,7 +93,6 @@ static inline Thread_t * prvGetThreadFromTask( TaskHandle_t xTask )
/*-----------------------------------------------------------*/
static pthread_once_t hSigSetupThread = PTHREAD_ONCE_INIT;
-static sigset_t xResumeSignals;
static sigset_t xAllSignals;
static sigset_t xSchedulerOriginalSignalMask;
static pthread_t hMainThread = ( pthread_t ) NULL;
@@ -527,8 +526,6 @@ static void prvSetupSignalsAndSchedulerPolicy( void )
hMainThread = pthread_self();
/* Initialise common signal masks. */
- sigemptyset( &xResumeSignals );
- sigaddset( &xResumeSignals, SIG_RESUME );
sigfillset( &xAllSignals );
/* Don't block SIGINT so this can be used to break into GDB while
|
Fix for kvpy test failures. | @@ -449,7 +449,7 @@ wal_txn_begin(struct wal *wal, uint64_t txid, int64_t *cookie)
merr_t
wal_txn_abort(struct wal *wal, uint64_t txid, int64_t cookie)
{
- assert(cookie >= 0);
+ assert(!wal || cookie >= 0);
return wal_txn(wal, WAL_RT_TXABORT, txid, 0, &cookie);
}
@@ -457,7 +457,7 @@ wal_txn_abort(struct wal *wal, uint64_t txid, int64_t cookie)
merr_t
wal_txn_commit(struct wal *wal, uint64_t txid, uint64_t seqno, int64_t cookie)
{
- assert(cookie >= 0);
+ assert(!wal || cookie >= 0);
return wal_txn(wal, WAL_RT_TXCOMMIT, txid, seqno, &cookie);
}
|
Build: Remove reference to AWS. (PR RavenProject#915)
- AWS removed from build-raven.yml. | @@ -19,7 +19,6 @@ on:
env:
SCRIPTS: ${{ GITHUB.WORKSPACE }}/.github/scripts
- AWS_S3_ENABLE: ${{ secrets.AWS_S3_ENABLE }}
jobs:
build:
@@ -58,18 +57,6 @@ jobs:
- name: Package Up the Build
run: ${SCRIPTS}/06-package.sh ${{ MATRIX.OS }} ${{ GITHUB.WORKSPACE }} ${{ GITHUB.BASE_REF }} ${{ GITHUB.REF }}
- - name: Upload Build to the Nightly Site
- if: env.AWS_S3_ENABLE == 'true'
- uses: jakejarvis/s3-sync-action@master
- with:
- args: --acl public-read --follow-symlinks
- env:
- SOURCE_DIR: "${{ GITHUB.WORKSPACE }}/release/"
- DEST_DIR: "${{ secrets.AWS_S3_LOCATION }}/${{ MATRIX.OS }}/"
- AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
-
- name: Upload Artifacts to Job
uses: actions/upload-artifact@master
with:
|
Document undocumented Connection URI Options | @@ -56,6 +56,7 @@ Connection Options
------------------
================ =========================================================================================================================================================================================================================
+appname The client application name. This value is used by MongoDB when it logs connection information and profile information, such as slow queries.
ssl {true|false}, indicating if SSL must be used. (See also :symbol:`mongoc_client_set_ssl_opts` and :symbol:`mongoc_client_pool_set_ssl_opts`.)
connectTimeoutMS A timeout in milliseconds to attempt a connection before timing out. This setting applies to server discovery and monitoring connections as well as to connections for application operations. The default is 10 seconds.
socketTimeoutMS The time in milliseconds to attempt to send or receive on a socket before the attempt times out. The default is 5 minutes.
@@ -63,6 +64,23 @@ socketTimeoutMS The time in milliseconds to attempt to send or receive on a so
Setting any of the \*TimeoutMS options above to ``0`` will be interpreted as "use the default value".
+Authentication Options
+----------------------
+
+======================= ============================================================================================================================================================================================================
+authMechanism Specifies the mechanism to use when authenticating as the provided user. See :doc:`Authentication <authentication>` for supported values.
+authMechanismProperties Certain authentication mechanisms have additional options that can be configured. These options should be provided as colon separated option_key:_option_value pair and provided as authMechanismProperties.
+authSource The authSource defines the database that should be used to authenticate to. It is unnecessary to provide this option the database name is the same as the database used in the URI.
+======================= ============================================================================================================================================================================================================
+
+Mechanism Properties
+~~~~~~~~~~~~~~~~~~~~
+
+==================== ========================================================================
+canonicalizeHostname Use the canonical hostname of the service, rather then configured alias.
+gssapiServicename Use alternative service name. The default is ``mongodb``.
+==================== ========================================================================
+
Server Discovery, Monitoring, and Selection Options
---------------------------------------------------
@@ -148,7 +166,7 @@ When connected to a replica set, the driver chooses which member to query using
#. From these, if there are any tags sets configured, choose members matching the first tag set. If there are none, fall back to the next tag set and so on, until some members are chosen or the tag sets are exhausted.
#. From the chosen servers, distribute queries randomly among the server with the fastest round-trip times. These include the server with the fastest time and any whose round-trip time is no more than "localThresholdMS" slower.
-================== =======================================================================================================================================================================
+=================== =======================================================================================================================================================================
readPreference Specifies the replica set read preference for this connection. This setting overrides any slaveOk value. The read preference values are the following:
* primary (default)
@@ -156,17 +174,13 @@ readPreference Specifies the replica set read preference for this connectio
* secondary
* secondaryPreferred
* nearest
-
-
-
-
-
readPreferenceTags Specifies a tag set as a comma-separated list of colon-separated key-value pairs.
Cannot be combined with preference "primary".
localThresholdMS How far to distribute queries, beyond the server with the fastest round-trip time. By default, only servers within 15ms of the fastest round-trip time receive queries.
-================== =======================================================================================================================================================================
+maxStalenessSeconds The maximum replication lag, in wall clock time, that a secondary can suffer and still be eligible. The smallest allowed value for maxStalenessSeconds is 90 seconds.
+=================== =======================================================================================================================================================================
.. note::
|
Use platform specific directory separators; | @@ -199,10 +199,12 @@ int lovrFilesystemSetIdentity(const char* identity) {
}
}
+ const char* sep = PHYSFS_getDirSeparator();
+
lovrFilesystemGetAppdataDirectory(state.savePathFull, LOVR_PATH_MAX);
PHYSFS_setWriteDir(state.savePathFull);
- snprintf(state.savePathRelative, LOVR_PATH_MAX, "LOVR/%s", identity);
- snprintf(state.savePathFull, LOVR_PATH_MAX, "%s/%s", state.savePathFull, state.savePathRelative);
+ snprintf(state.savePathRelative, LOVR_PATH_MAX, "LOVR%s%s", sep, identity);
+ snprintf(state.savePathFull, LOVR_PATH_MAX, "%s%s%s", state.savePathFull, sep, state.savePathRelative);
PHYSFS_mkdir(state.savePathRelative);
PHYSFS_setWriteDir(state.savePathRelative);
PHYSFS_mount(state.savePathFull, NULL, 0);
|
Add action name comment to generated code | @@ -39,6 +39,9 @@ for table in hlir.tables:
for ctl in hlir.controls:
for act in ctl.actions:
+ name = act.annotations.annotations.get('name')
+ if name:
+ #[ // action name: ${name.expr[0].value}
#{ void action_code_${act.name}(action_${act.name}_params_t parameters, SHORT_STDPARAMS) {
#[ uint32_t value32, res32, mask32;
#[ (void)value32; (void)res32; (void)mask32;
|
This was not necessary | @@ -19,14 +19,12 @@ typedef struct clap_plugin_state {
// Returns true if the state was correctly restored.
// [main-thread]
bool (*load)(const clap_plugin *plugin, clap_istream *stream);
-
- // [main-thread]
- bool (*is_dirty)(const clap_plugin *plugin);
} clap_plugin_state;
typedef struct clap_host_state {
// Tell the host that the plugin state has changed and should be saved again.
- // [thread-safe]
+ // If a parameter value changes, then it is implicit that the state is dirty.
+ // [main-thread]
void (*mark_dirty)(const clap_host *host);
} clap_host_state;
|
Mitigation for crashing when executing commands on Linux
Sometimes, upon entering a command, the client will terminate with Signal 28 with a buffer underflow in fgets(). Until the cause is determined, this mitigation causes the software to not crash. | @@ -391,9 +391,14 @@ static int out_balances(void) {
static int terminal(void) {
#if !defined(_WIN32) && !defined(_WIN64)
- char cmd[CHEATCOIN_COMMAND_MAX], cmd2[CHEATCOIN_COMMAND_MAX], *ptr, *lasts;
+ // char cmd[CHEATCOIN_COMMAND_MAX], cmd2[CHEATCOIN_COMMAND_MAX], *ptr, *lasts;
+ char *cmd, *cmd2, *ptr, *lasts;
int s;
struct sockaddr_un addr;
+
+ cmd = malloc(CHEATCOIN_CMD_MAX);
+ cmd2 = malloc(CHEATCOIN_CMD_MAX);
+
while(1) {
int ispwd = 0, c = 0;
printf("%s> ", g_progname); fflush(stdout);
@@ -611,10 +616,16 @@ int main(int argc, char **argv) {
for(;;) {
if (transport_flags & CHEATCOIN_DAEMON) sleep(100);
else {
- char cmd[CHEATCOIN_COMMAND_MAX];
+ // char cmd[CHEATCOIN_COMMAND_MAX];
+ char *cmd;
+ cmd = malloc(CHEATCOIN_COMMAND_MAX);
printf("%s> ", g_progname); fflush(stdout);
fgets(cmd, CHEATCOIN_COMMAND_MAX, stdin);
- if (cheatcoin_command(cmd, stdout) < 0) break;
+ if (cheatcoin_command(cmd, stdout) < 0) {
+ free(cmd);
+ break;
+ }
+ free(cmd);
}
}
#endif
|
Cleaned up Mackerel explosion.
A lot of our Haskell code is *seriously* inefficient. Mackerel created arrays
n^2 in the size of the *device's address space* to check for overlapping
registers, and then walked them. End result for Solarflare card was a >1TB
virtual address space for Haskell. | module RegisterTable where
+import Data.List
import MackerelParser
import Text.ParserCombinators.Parsec
import Attr
@@ -137,8 +138,24 @@ overlap :: Rec -> Rec -> Bool
overlap r1 r2
| spc_id r1 /= spc_id r2 = False
| base r1 /= base r2 = False
+ | spc r1 == Space.NoSpace = False
+ | spc r2 == Space.NoSpace = False
+ | otherwise = compare_extents (extents r1) (extents r2)
+
+compare_extents :: [ (Integer, Integer) ] -> [ (Integer, Integer) ] -> Bool
+compare_extents [] _ = False
+compare_extents _ [] = False
+compare_extents (e:es) (f:fs)
+ | extent_overlap e f = True
| otherwise =
- any extent_overlap [ (e1, e2) | e1 <- extents r1, e2 <- extents r2 ]
+ if fst e < fst f
+ then compare_extents es (f:fs)
+ else compare_extents (e:es) fs
+
+extent_overlap :: (Integer, Integer) -> (Integer, Integer) -> Bool
+extent_overlap (b1, o1) (b2, o2)
+ | b1 > b2 = ( b2 + o2 > b1 )
+ | otherwise = ( b1 + o1 > b2 )
extents :: Rec -> [ (Integer, Integer) ]
extents r
@@ -149,19 +166,12 @@ extentsz :: Space.SpaceType -> Integer -> Integer
extentsz (Space.BYTEWISE s) sz = sz `div` 8 `div` s
extentsz _ sz = 1
-
-
arrayoffsets :: ArrayLoc -> Integer -> [ Integer ]
arrayoffsets (ArrayListLoc []) _ = [0]
-arrayoffsets (ArrayListLoc l) _ = l
+arrayoffsets (ArrayListLoc l) _ = (sort l) -- Return offsets in order
arrayoffsets (ArrayStepLoc n 0) sz = enumFromThenTo 0 (sz `div` 8) (sz* (n-1) `div` 8)
arrayoffsets (ArrayStepLoc n s) _ = enumFromThenTo 0 s (s* (n-1))
-extent_overlap :: ( (Integer, Integer), (Integer, Integer)) -> Bool
-extent_overlap ( (b1, o1), (b2, o2) )
- | b1 > b2 = ( b2 + o2 > b1 )
- | otherwise = ( b1 + o1 > b2 )
-
--
-- Lookups
--
|
fixed timer | @@ -1572,6 +1572,8 @@ static void api_tick(tic_mem* tic, tic_tick_data* data)
if(tic->input == tic_mouse_input)
tic->ram.vram.vars.mask.data = 0;
+ data->start = data->counter();
+
config = getScriptConfig(code);
done = config->init(tic, code);
}
@@ -1584,8 +1586,6 @@ static void api_tick(tic_mem* tic, tic_tick_data* data)
if(done)
{
- data->start = data->counter();
-
machine->state.tick = config->tick;
machine->state.scanline = config->scanline;
machine->state.ovr.callback = config->overlap;
|
groups: Use presig on group join links | @@ -6,7 +6,7 @@ import {
Button,
ManagedTextInputField,
ManagedCheckboxField,
- ContinuousProgressBar,
+ ContinuousProgressBar
} from '@tlon/indigo-react';
import { Formik, Form } from 'formik';
import React, { useEffect, useState } from 'react';
@@ -20,6 +20,7 @@ import airlock from '~/logic/api';
import { joinError, joinLoad, JoinProgress } from '@urbit/api';
import { useQuery } from '~/logic/lib/useQuery';
import { JoinKind, JoinDesc, JoinSkeleton } from './Skeleton';
+import { preSig } from '~/logic/lib/util';
interface InviteWithUid extends Invite {
uid: string;
@@ -32,7 +33,7 @@ interface FormSchema {
const initialValues = {
autojoin: false,
- shareContact: false,
+ shareContact: false
};
function JoinForm(props: {
@@ -174,7 +175,6 @@ function JoinError(props: {
dismiss();
};
-
return (
<JoinSkeleton modal={modal} title={title} desc={desc}>
<Col p='4' gapY='4'>
@@ -272,7 +272,7 @@ export function JoinPrompt(props: JoinPromptProps) {
};
const onSubmit = async ({ link }: PromptFormSchema) => {
- const path = `/ship/${link}`;
+ const path = `/ship/${preSig(link)}`;
history.push({
search: appendQuery({ 'join-path': path })
});
|
improve bit range skipping in region search | @@ -186,7 +186,7 @@ static bool mi_region_commit_blocks(mem_region_t* region, size_t idx, size_t bit
// Use bit scan forward to quickly find the first zero bit if it is available
#if defined(_MSC_VER)
-#define MI_HAVE_BSF
+#define MI_HAVE_BITSCAN
#include <intrin.h>
static inline size_t mi_bsf(uintptr_t x) {
if (x==0) return 8*MI_INTPTR_SIZE;
@@ -198,10 +198,23 @@ static inline size_t mi_bsf(uintptr_t x) {
#endif
return idx;
}
+static inline size_t mi_bsr(uintptr_t x) {
+ if (x==0) return 8*MI_INTPTR_SIZE;
+ DWORD idx;
+ #if (MI_INTPTR_SIZE==8)
+ _BitScanReverse64(&idx, x);
+ #else
+ _BitScanReverse(&idx, x);
+ #endif
+ return idx;
+}
#elif defined(__GNUC__) || defined(__clang__)
-#define MI_HAVE_BSF
+#define MI_HAVE_BITSCAN
static inline size_t mi_bsf(uintptr_t x) {
- return (x==0 ? 8*MI_INTPTR_SIZE : __builtin_ctz(x));
+ return (x==0 ? 8*MI_INTPTR_SIZE : __builtin_ctzl(x));
+}
+static inline size_t mi_bsr(uintptr_t x) {
+ return (x==0 ? 8*MI_INTPTR_SIZE : (8*MI_INTPTR_SIZE - 1) - __builtin_clzl(x));
}
#endif
@@ -218,7 +231,7 @@ static bool mi_region_alloc_blocks(mem_region_t* region, size_t idx, size_t bloc
const size_t bitidx_max = MI_REGION_MAP_BITS - blocks;
uintptr_t map = mi_atomic_read(®ion->map);
- #ifdef MI_HAVE_BSF
+ #ifdef MI_HAVE_BITSCAN
size_t bitidx = mi_bsf(~map); // quickly find the first zero bit if possible
#else
size_t bitidx = 0; // otherwise start at 0
@@ -234,6 +247,7 @@ static bool mi_region_alloc_blocks(mem_region_t* region, size_t idx, size_t bloc
if (!mi_atomic_compare_exchange(®ion->map, newmap, map)) {
// no success, another thread claimed concurrently.. keep going
map = mi_atomic_read(®ion->map);
+ continue;
}
else {
// success, we claimed the bits
@@ -241,9 +255,17 @@ static bool mi_region_alloc_blocks(mem_region_t* region, size_t idx, size_t bloc
return mi_region_commit_blocks(region, idx, bitidx, blocks, size, commit, p, id, tld);
}
}
- // on to the next bit
- bitidx++;
- m <<= 1;
+ else {
+ // on to the next bit range
+ #ifdef MI_HAVE_BITSCAN
+ size_t shift = (blocks == 1 ? 1 : mi_bsr(map & m) - bitidx + 1);
+ mi_assert_internal(shift > 0 && shift <= blocks);
+ #else
+ size_t shift = 1;
+ #endif
+ bitidx += shift;
+ m <<= shift;
+ }
}
// no error, but also no bits found
return true;
|
pkg/container-collection: Make not fatal error description more soft | @@ -123,7 +123,7 @@ func WithContainerRuntimeEnrichment(runtime *containerutils.RuntimeConfig) Conta
// Enrich already running containers
containers, err := runtimeClient.GetContainers()
if err != nil {
- log.Warnf("Runtime enricher (%s): failed to get current containers",
+ log.Warnf("Runtime enricher (%s): couldn't get current containers",
runtime.Name)
return nil
|
meta: mention default_library in README.md | @@ -29,10 +29,11 @@ The following custom meson options are accepted, in addition to the [built-in op
- `headers_only`: Only install headers; don't build `libc.so` or `ld.so`.
- `mlibc_no_headers`: Don't install headers; only build `libc.so` and `ld.so`.
-- `static`: Build `libc.a` and `ld.a` instead of `libc.so` and `ld.so`. This disables the dynamic linker.
- `build_tests`: Build the test suite (see below).
- `disable_x_option`: Disable `x` component of mlibc functionality. See `meson_options.txt` for a full list of possible values for `x`. This may be used to e.g disable POSIX and glibc extensions.
+The type of library to be built (static, shared, or both) is controlled by meson's `default_library` option. Passing `-Ddefault_library=static` effectively disables the dynamic linker.
+
We also support building with `-Db_sanitize=undefined` to use UBSan inside mlibc. Note that this does not enable UBSan for external applications which link against `libc.so`, but it can be useful during development to detect internal bugs (e.g when adding new sysdeps).
## Running Tests
|
in_tail: file: add structure fields for links | struct flb_tail_file {
/* Inotify */
int watch_fd;
-
/* file lookup info */
int fd;
off_t size;
@@ -42,6 +41,8 @@ struct flb_tail_file {
uint64_t inode;
#else
ino_t inode;
+ ino_t link_inode;
+ int is_link;
#endif
char *name; /* target file name given by scan routine */
#if !defined(__linux) || !defined(FLB_HAVE_INOTIFY)
|
margins for M2 DRCs | @@ -22,8 +22,9 @@ vlsi.inputs.mmmc_corners: [
]
# Specify clock signals
+# ASAP7 bug: period value should actually be in ps
vlsi.inputs.clocks: [
- {name: "clock", period: "20ns", uncertainty: "0.1ns"}
+ {name: "clock", period: "1000ns", uncertainty: "0.1ns"}
]
# Generate Make include to aid in flow
@@ -59,17 +60,17 @@ vlsi.inputs.placement_constraints:
type: "toplevel"
x: 0
y: 0
- width: 500
- height: 500
+ width: 300
+ height: 300
margins:
- left: 0
- right: 0
- top: 0
- bottom: 0
+ left: 10
+ right: 10
+ top: 10
+ bottom: 10
- path: "Sha3AccelwBB/dco"
type: "hardmacro"
- x: 400
- y: 400
+ x: 100
+ y: 100
width: 32
height: 32
orientation: "r0"
|
Documentation change, Wifi only: U_WIFI_STATUS_XXX -> U_WIFI_CON_STATUS_XXX | @@ -127,11 +127,11 @@ typedef void (*uWifiScanResultCallback_t) (uDeviceHandle_t devHandle,
* @param connId connection ID.
* @param status new status of connection. Please see U_WIFI_CON_STATUS_xx.
* @param channel wifi channel.
- * Note: Only valid for U_WIFI_STATUS_CONNECTED otherwise set to 0.
+ * Note: Only valid for U_WIFI_CON_STATUS_CONNECTED otherwise set to 0.
* @param pBssid remote AP BSSID as null terminated string.
- * Note: Only valid for U_WIFI_STATUS_CONNECTED otherwise set to NULL.
+ * Note: Only valid for U_WIFI_CON_STATUS_CONNECTED otherwise set to NULL.
* @param disconnectReason disconnect reason. Please see U_WIFI_REASON_xx.
- * Note: Only valid for U_WIFI_STATUS_DISCONNECTED otherwise set to 0.
+ * Note: Only valid for U_WIFI_CON_STATUS_DISCONNECTED otherwise set to 0.
* @param pCallbackParameter parameter pointer set when registering callback.
*/
typedef void (*uWifiConnectionStatusCallback_t) (uDeviceHandle_t devHandle,
|
zephyr/drivers/cros_system/cros_system_it8xxx2.c: Format with clang-format
BRANCH=none
TEST=none | @@ -36,8 +36,7 @@ static uint32_t system_get_chip_id(void)
struct gctrl_it8xxx2_regs *const gctrl_base = GCTRL_IT8XXX2_REG_BASE;
return (gctrl_base->GCTRL_ECHIPID1 << 16) |
- (gctrl_base->GCTRL_ECHIPID2 << 8) |
- gctrl_base->GCTRL_ECHIPID3;
+ (gctrl_base->GCTRL_ECHIPID2 << 8) | gctrl_base->GCTRL_ECHIPID3;
}
static uint8_t system_get_chip_version(void)
@@ -63,8 +62,8 @@ static const char *cros_system_it8xxx2_get_chip_name(const struct device *dev)
return buf;
}
-static const char *cros_system_it8xxx2_get_chip_revision(const struct device
- *dev)
+static const char *
+cros_system_it8xxx2_get_chip_revision(const struct device *dev)
{
ARG_UNUSED(dev);
@@ -81,7 +80,8 @@ static int cros_system_it8xxx2_get_reset_cause(const struct device *dev)
ARG_UNUSED(dev);
struct gctrl_it8xxx2_regs *const gctrl_base = GCTRL_IT8XXX2_REG_BASE;
uint8_t last_reset_source = gctrl_base->GCTRL_RSTS & IT8XXX2_GCTRL_LRS;
- uint8_t raw_reset_cause2 = gctrl_base->GCTRL_SPCTRL4 &
+ uint8_t raw_reset_cause2 =
+ gctrl_base->GCTRL_SPCTRL4 &
(IT8XXX2_GCTRL_LRSIWR | IT8XXX2_GCTRL_LRSIPWRSWTR |
IT8XXX2_GCTRL_LRSIPGWR);
@@ -185,8 +185,8 @@ static int cros_system_it8xxx2_hibernate(const struct device *dev,
* Convert milliseconds(or at least 1 ms) to 32 Hz
* free run timer count for hibernate.
*/
- uint32_t c = (seconds * 1000 + microseconds / 1000 + 1) *
- 32 / 1000;
+ uint32_t c =
+ (seconds * 1000 + microseconds / 1000 + 1) * 32 / 1000;
/* Enable a 32-bit timer and clock source is 32 Hz */
/* Disable external timer x */
@@ -219,7 +219,8 @@ static int cros_system_it8xxx2_hibernate(const struct device *dev,
*/
#define WAKEUP_SETUP(id, prop, idx) \
do { \
- gpio_pin_configure_dt(GPIO_DT_FROM_NODE(WAKEUP_NGPIO(id, prop, idx)), \
+ gpio_pin_configure_dt( \
+ GPIO_DT_FROM_NODE(WAKEUP_NGPIO(id, prop, idx)), \
GPIO_INPUT); \
gpio_enable_dt_interrupt( \
GPIO_INT_FROM_NODE(WAKEUP_INT(id, prop, idx))); \
@@ -228,8 +229,7 @@ do { \
/*
* For all the wake-pins, re-init the GPIO and re-enable the interrupt.
*/
- DT_FOREACH_PROP_ELEM(SYSTEM_DT_NODE_HIBERNATE_CONFIG,
- wakeup_irqs,
+ DT_FOREACH_PROP_ELEM(SYSTEM_DT_NODE_HIBERNATE_CONFIG, wakeup_irqs,
WAKEUP_SETUP);
#undef WAKEUP_INT
|
correcting description for taxonomy Compiler | <description Cclass="Graphics">Graphical User Interface</description>
<description Cclass="Network">Network Stack using Internet Protocols</description>
<description Cclass="USB">Universal Serial Bus Stack</description>
- <description Cclass="Compiler">ARM Compiler Software Extensions</description>
+ <description Cclass="Compiler">Compiler Software Extensions</description>
<description Cclass="RTOS">Real-time Operating System</description>
</taxonomy>
|
update compiler settings for sanitizers | @@ -208,14 +208,14 @@ if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STR
endif ()
if (SANITIZER_ADDRESS)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g -Wno-address-of-packed-member")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g -Wno-address-of-packed-member")
endif ()
if (SANITIZER_MEMORY)
# maybe add "-fPIE -pie" here
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -Wno-address-of-packed-member -fsanitize-memory-track-origins")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -Wno-address-of-packed-member -fsanitize-memory-track-origins")
endif ()
endif ()
|
Ccode: Do not use upper case for constants | @@ -150,9 +150,9 @@ void elektraCcodeDecode (Key * key, CCodeData * mapping)
const char * value = static_cast<const char *> (keyValue (key));
if (!value) return;
- size_t const SIZE = keyGetValueSize (key) - 1;
+ size_t const size = keyGetValueSize (key) - 1;
size_t out = 0;
- for (size_t in = 0; in < SIZE; ++in)
+ for (size_t in = 0; in < size; ++in)
{
unsigned char character = value[in];
@@ -190,9 +190,9 @@ void elektraCcodeEncode (Key * key, CCodeData * mapping)
const char * value = static_cast<const char *> (keyValue (key));
if (!value) return;
- size_t const SIZE = keyGetValueSize (key);
+ size_t const size = keyGetValueSize (key);
size_t out = 0;
- for (size_t in = 0; in < SIZE - 1; ++in)
+ for (size_t in = 0; in < size - 1; ++in)
{
unsigned char character = value[in];
|
acrn-config: find 64-bit mmio for HI_MMIO_START/HI_MMIO_END
Find the 64-bit mmio window from /proc/iomem to generate HI_MMIO_START/HI_MMIO_END.
Acked-by: Victor Sun
Acked-by: Terry Zou | @@ -70,6 +70,47 @@ def parse_boot_info():
return (err_dic, sos_cmdlines, sos_rootfs, vuart0_dic, vuart1_dic, vm_types)
+def find_hi_mmio_window(config):
+
+ i_cnt = 0
+ mmio_min = 0
+ mmio_max = 0
+ is_hi_mmio = False
+
+ iomem_lines = board_cfg_lib.get_info(board_cfg_lib.BOARD_INFO_FILE, "<IOMEM_INFO>", "</IOMEM_INFO>")
+
+ for line in iomem_lines:
+ if "PCI Bus" not in line:
+ continue
+
+ line_start_addr = int(line.split('-')[0], 16)
+ line_end_addr = int(line.split('-')[1].split()[0], 16)
+ if line_start_addr < board_cfg_lib.SIZE_4G and line_end_addr < board_cfg_lib.SIZE_4G:
+ continue
+ elif line_start_addr < board_cfg_lib.SIZE_4G and line_end_addr >= board_cfg_lib.SIZE_4G:
+ i_cnt += 1
+ is_hi_mmio = True
+ mmio_min = board_cfg_lib.SIZE_4G
+ mmio_max = line_end_addr
+ continue
+
+ is_hi_mmio = True
+ if i_cnt == 0:
+ mmio_min = line_start_addr
+ mmio_max = line_end_addr
+
+ if mmio_max < line_end_addr:
+ mmio_max = line_end_addr
+ i_cnt += 1
+
+ print("", file=config)
+ if is_hi_mmio:
+ print("#define HI_MMIO_START\t\t0x%xUL" % mmio_min, file=config)
+ print("#define HI_MMIO_END\t\t0x%xUL" % mmio_max, file=config)
+ else:
+ print("#define HI_MMIO_START\t\t~0UL", file=config)
+ print("#define HI_MMIO_END\t\t0UL", file=config)
+
def generate_file(config):
"""
Start to generate board.c
@@ -171,6 +212,10 @@ def generate_file(config):
print("#define MAX_HIDDEN_PDEVS_NUM {}U".format(len(board_cfg_lib.KNOWN_HIDDEN_PDEVS_BOARD_DB[board_cfg_lib.BOARD_NAME])), file=config)
else:
print("#define MAX_HIDDEN_PDEVS_NUM 0U", file=config)
+
+ # generate HI_MMIO_START/HI_MMIO_END
+ find_hi_mmio_window(config)
+
print("", file=config)
print("{}".format(MISC_CFG_END), file=config)
|
Update writingrules.rst - Reserved Words Table
Update from commit broke Markdown rendering of table -- Reformatted | @@ -23,51 +23,55 @@ keywords are reserved and cannot be used as an identifier:
.. list-table:: YARA keywords
- :widths: 10 10 10 10 10 10 10
+ :widths: 10 10 10 10 10 10 10 10
* - all
- and
- any
- ascii
- at
+ - base64
+ - base64wide
- condition
- - contains
- * - entrypoint
+ * - contains
+ - entrypoint
- false
- filesize
- - fullword
- for
+ - fullword
- global
- - in
- * - import
+ - import
+ * - in
- include
- - int8
- int16
+ - int16be
- int32
+ - int32be
+ - int8
- int8be
- - int16be
- * - int32be
- - matches
+ * - matches
- meta
- nocase
- not
- - or
- of
- * - private
+ - or
+ - private
- rule
- - strings
+ * - strings
- them
- true
- - uint8
- uint16
- * - uint32
- - uint8be
- uint16be
+ - uint32
- uint32be
+ - uint8
+ * - uint8be
- wide
- xor
- - base64
- - base64wide
+ -
+ -
+ -
+ -
-
Rules are generally composed of two sections: strings definition and condition.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.