message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
CFLAGS: don't set Werror by default | @@ -191,8 +191,8 @@ endif ()
# SETTINGS FOR UNIX COMPILER
if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xGNU")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -Werror -Wfloat-equal -Wshadow -Wpointer-arith -Wunreachable-code -Winit-self -Wno-unused-function -Wno-unused-parameter")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -Werror -Wfloat-equal -Wshadow -Wpointer-arith -Wunreachable-code -Winit-self -Wno-unused-function -Wno-unused-parameter")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Wunreachable-code -Winit-self -Wno-unused-function -Wno-unused-parameter")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Wunreachable-code -Winit-self -Wno-unused-function -Wno-unused-parameter")
if (WERROR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
hide_edge_borders.c: add missing case for --i3
Disable the i3-compatible behavior if the option '--i3' is not given.
Previously it was only possible to disable it by changing the config
file. Now it also works via swaymsg. | @@ -13,6 +13,8 @@ struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
config->hide_lone_tab = true;
++argv;
--argc;
+ } else {
+ config->hide_lone_tab = false;
}
if (strcmp(argv[0], "none") == 0) {
|
fix(boards): Fix Blue LED pin definition in BlueMicro840
This commit fixes the pin definition for BlueMicro840. Based on the
schematics, the blue led is at pin 1.10. | leds {
compatible = "gpio-leds";
blue_led: led_0 {
- gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>;
+ gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
|
gh-actions: check for headers in meson.build
We want to make sure we don't forget to install new headers as they are
added. | @@ -37,6 +37,8 @@ jobs:
# Don't #ifndef ; use !defined(...) instead. ifndef leads to annoying inconsistencies
- name: ifndef
run: for file in $(find simde -name '*.h'); do grep -qP '^ *# *ifndef ' "${file}" && exit 1 || exit 0; done
+ - name: Meson install headers
+ run: for file in $(find simde -name '*.h'); do grep -qF "${file}" meson.build || (echo "${file} missing from top-level meson.build" && exit 1); done
x86:
runs-on: ubuntu-latest
|
Fix darktheme toolbar button icon alignment | @@ -1705,15 +1705,29 @@ LRESULT CALLBACK PhThemeWindowDrawToolbar(
0,
0
))
+ {
+ LONG x;
+ LONG y;
+
+ if (buttonInfo.fsStyle & BTNS_SHOWTEXT)
{
DrawInfo->nmcd.rc.left += 5;
+ x = DrawInfo->nmcd.rc.left;// + ((DrawInfo->nmcd.rc.right - DrawInfo->nmcd.rc.left) - PhSmallIconSize.X) / 2;
+ y = DrawInfo->nmcd.rc.top + ((DrawInfo->nmcd.rc.bottom - DrawInfo->nmcd.rc.top) - PhSmallIconSize.Y) / 2;
+ }
+ else
+ {
+ x = DrawInfo->nmcd.rc.left + ((DrawInfo->nmcd.rc.right - DrawInfo->nmcd.rc.left) - PhSmallIconSize.X) / 2;
+ y = DrawInfo->nmcd.rc.top + ((DrawInfo->nmcd.rc.bottom - DrawInfo->nmcd.rc.top) - PhSmallIconSize.Y) / 2;
+ }
+
PhImageListDrawIcon(
toolbarImageList,
buttonInfo.iImage,
DrawInfo->nmcd.hdc,
- DrawInfo->nmcd.rc.left,
- DrawInfo->nmcd.rc.top + 3,
+ x,
+ y,
ILD_NORMAL
);
}
|
disable useless mirror site & upd fastgit | @@ -2,7 +2,7 @@ import("net.fasturl")
function mirror(url)
local configs = {}
- local proxyurls = {"github.com.cnpmjs.org", "hub.fastgit.org"}
+ local proxyurls = {"hub.fastgit.xyz"}
fasturl.add(proxyurls)
proxyurls = fasturl.sort(proxyurls)
if #proxyurls > 0 then
|
[RAFT] Minor fix of timing issue (by everjs) | @@ -62,6 +62,7 @@ var (
)
var (
+ ErrRaftNotReady = errors.New("raft library is not initialized")
ErrCCAlreadyApplied = errors.New("conf change entry is already applied")
ErrInvalidMember = errors.New("member of conf change is invalid")
ErrCCAlreadyAdded = errors.New("member has already added")
@@ -1218,7 +1219,11 @@ func (rs *raftServer) setConfState(state *raftpb.ConfState) {
}
func (rs *raftServer) Process(ctx context.Context, m raftpb.Message) error {
- return rs.node.Step(ctx, m)
+ node := rs.getNodeSync()
+ if node == nil {
+ return ErrRaftNotReady
+ }
+ return node.Step(ctx, m)
}
func (rs *raftServer) IsIDRemoved(id uint64) bool {
|
Controller: added "/config" prefix for the configuration object. | @@ -769,6 +769,17 @@ nxt_controller_process_request(nxt_task_t *task, nxt_controller_request_t *req)
c = req->conn;
path = req->parser.path;
+ if (nxt_str_start(&path, "/config", 7)) {
+
+ if (path.length == 7) {
+ path.length = 1;
+
+ } else if (path.start[7] == '/') {
+ path.length -= 7;
+ path.start += 7;
+ }
+ }
+
if (path.length > 1 && path.start[path.length - 1] == '/') {
path.length--;
}
|
Set LIBSONAME suffix to .a for AIX
another fix for | @@ -1211,7 +1211,11 @@ endif
LIBDLLNAME = $(LIBPREFIX).dll
IMPLIBNAME = lib$(LIBNAMEBASE).dll.a
+ifneq ($(OSNAME), AIX)
LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
+else
+LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.a)
+endif
LIBDYNNAME = $(LIBNAME:.$(LIBSUFFIX)=.dylib)
LIBDEFNAME = $(LIBNAME:.$(LIBSUFFIX)=.def)
LIBEXPNAME = $(LIBNAME:.$(LIBSUFFIX)=.exp)
|
story: fix error with null jug | ++ dif-ju
|= [a=story b=story]
^- story
- ::?: ?=(~ a) b
- ::?< ?=(~ a)
- ::?< ?=(~ b)
- ::~! a
- ::~! b
+ :: 0 - b = -b. how do we negate a jug/"infinite" set lol?
+ :: a - 0 = a (not impl.)
:: uno := (a-b) + (merged items in both a and b) + (b-a)
:: ret := (a-b) + (merged items in both a and b)
:: ret = (~(int by a) uno) :: preserve only the entries whose keys are in a
::
- :: uno doesn't work on emtpty
- :: 0 - b = b
- :: a - 0 = a
- ::=/ proses-set %- ~(gas by *(set prose)) ~[['loll' 'lolll'] ['t' 'b']]
- ::=/ story-a=story %- ~(gas by *story) ~[[0v1 proses-set]]
- ::?: ?=(~ a) b :: need this so that uno
- ::?: ?=(~ b) a
- ::~! ((~(uno by a) b) |=(* *proses))
::
+ :: uno doesn't work if first argument is empty map
+ ?: =(~ a) b
+ ~& a
=/ uno=story
::~! ((~(uno by story-a) story-a) |=(* *proses))
::~! ((~(uno by `story`a) `story`a) |=(* *proses))
- %- (~(uno by a) b) ::|=(* *proses)
+ %- (~(uno by a) b)
|= [k=tako:clay proses-a=proses proses-b=proses]
^- proses
(~(dif in proses-a) proses-b)
++ uni-ju
|= [a=story b=story]
^- story
+ :: 0 + b = b
+ ?: =(~ a) b
%- (~(uno by a) b)
|= [k=tako:clay proses-a=proses proses-b=proses]
^- proses
|
u3: updates %leer jet (+to-wain) to use u3i_defcons() | u3_noun
u3qe_leer(u3_atom txt)
+ {
+ u3_noun pro;
+ u3_noun* lit = &pro;
+
{
c3_w pos_w, i_w = 0, len_w = u3r_met(3, txt);
- u3_noun out = u3_nul;
while ( 1 ) {
// scan till end or newline
break;
}
}
+
// append to list
- out = u3nc(_lore_cut(pos_w, i_w - pos_w, txt), out);
+ {
+ u3_noun* hed;
+ u3_noun* tel;
+
+ *lit = u3i_defcons(&hed, &tel);
+ *hed = _lore_cut(pos_w, i_w - pos_w, txt);
+ lit = tel;
+ }
+
// finish or advance
if ( i_w++ == len_w ) {
break;
}
}
+ }
+
+ *lit = u3_nul;
- return u3kb_flop(out);
+ return pro;
}
u3_noun
|
docs: update template bot.config | {
- "discord": {
- "token":"YOUR-BOT-TOKEN"
- },
"logging": {
"filename": "bot.log",
"level": "info",
"filename": "dump.curl",
"enable": false,
}
+ },
+ "discord": {
+ "token":"YOUR-BOT-TOKEN"
+ },
+ "slack": {
+ "token":YOUR-BOT-TOKEN"
},
"github": {
"username": "YOUR-GITHUB-USERNAME",
"token": "YOUR-PERSONAL-ACCESS-TOKEN"
- }
+ },
"reddit": {
"username": "YOUR-REDDIT-USERNAME",
"password": "YOUR-REDDIT-PASSWORD",
"client_id": "REDDIT-CLIENT-ID",
"client_secret": "REDDIT-CLIENT-SECRET"
}
- "user_agent": "USER-ARGENT"
}
|
fix ethans patch to check if NDEBUG is set already before setting it , otherwise we get a double define | diff --git a/src/core/util/utils.h b/src/core/util/utils.h
-index f7f09e9..a68caa6 100755
+index f7f09e9..8016979 100755
--- a/src/core/util/utils.h
+++ b/src/core/util/utils.h
-@@ -49,6 +49,7 @@
+@@ -49,6 +49,9 @@
#include "stddef.h"
#include "stdlib.h"
#include <assert.h>
++#ifndef NDEBUG
+#define NDEBUG
++#endif
typedef unsigned int uint;
typedef uint64_t uint64;
|
zephyr/projects/nissa/src/common.c: Format with clang-format
BRANCH=none
TEST=none | @@ -81,8 +81,8 @@ static void board_setup_init(void)
*/
DECLARE_HOOK(HOOK_INIT, board_setup_init, HOOK_PRIO_INIT_I2C);
-void board_set_charge_limit(int port, int supplier, int charge_ma,
- int max_ma, int charge_mv)
+void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
+ int charge_mv)
{
int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
|
linux/arch: move pid attaching procedures to a separate function | @@ -215,21 +215,32 @@ void arch_prepareParentAfterFork(run_t* run) {
}
}
-void arch_prepareParent(run_t* run) {
- pid_t ptracePid = (run->global->linux.pid > 0) ? run->global->linux.pid : run->pid;
- pid_t childPid = run->pid;
+static bool arch_attachToNewPid(run_t* run, pid_t pid) {
+ if (!arch_shouldAttach(run)) {
+ return true;
+ }
+ run->linux.attachedPid = pid;
+ if (!arch_traceAttach(run, pid)) {
+ LOG_W("arch_traceAttach(pid=%d) failed", pid);
+ kill(pid, SIGKILL);
+ return false;
+ }
- if (arch_shouldAttach(run) == true) {
- if (arch_traceAttach(run, ptracePid)) {
arch_perfClose(run);
- if (arch_perfOpen(ptracePid, run) == false) {
- LOG_F("arch_perfOpen(pid=%d)", (int)ptracePid);
+ if (arch_perfOpen(pid, run) == false) {
+ kill(pid, SIGKILL);
+ return false;
}
- } else {
- LOG_E("arch_traceAttach(pid=%d) failed", ptracePid);
- kill(ptracePid, SIGKILL);
+
+ return true;
}
- run->linux.attachedPid = ptracePid;
+
+void arch_prepareParent(run_t* run) {
+ pid_t ptracePid = (run->global->linux.pid > 0) ? run->global->linux.pid : run->pid;
+ pid_t childPid = run->pid;
+
+ if (!arch_attachToNewPid(run, ptracePid)) {
+ LOG_E("Couldn't attach to PID=%d", (int)ptracePid);
}
/* A long-lived process could have already exited, and we wouldn't know */
|
[openssl] Initialize X509_OBJECT before usage
([arc::pullid] 7018641-ddf4097b-c3880d05-3419c93f)
Note: mandatory check (NEED_CHECK) was skipped | @@ -297,6 +297,8 @@ int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type,
if (ctx == NULL)
return 0;
+ stmp.type = X509_LU_NONE;
+
CRYPTO_THREAD_write_lock(ctx->lock);
tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name);
CRYPTO_THREAD_unlock(ctx->lock);
|
(fix draw) txt add null pointer judgment to avoid segment fault | @@ -122,7 +122,11 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(const lv_area_t * coords, const lv_area
int32_t w;
/*No need to waste processor time if string is empty*/
+ if (txt != NULL) {
if(txt[0] == '\0') return;
+ } else {
+ return;
+ }
lv_area_t clipped_area;
bool clip_ok = _lv_area_intersect(&clipped_area, coords, mask);
|
chip/mchp/flash.c: Format with clang-format
BRANCH=none
TEST=none | @@ -70,8 +70,7 @@ int crec_flash_physical_write(int offset, int size, const char *data)
for (i = 0; i < size; i += write_size) {
write_size = MIN((size - i), SPI_FLASH_MAX_WRITE_SIZE);
- ret = spi_flash_write(offset + i,
- write_size,
+ ret = spi_flash_write(offset + i, write_size,
(uint8_t *)data + i);
if (ret != EC_SUCCESS)
break;
@@ -94,8 +93,7 @@ int crec_flash_physical_erase(int offset, int size)
if (entire_flash_locked)
return EC_ERROR_ACCESS_DENIED;
- trace12(0, FLASH, 0,
- "flash_phys_erase: offset=0x%08X size=0x%08X",
+ trace12(0, FLASH, 0, "flash_phys_erase: offset=0x%08X size=0x%08X",
offset, size);
ret = spi_flash_erase(offset, size);
return ret;
@@ -164,8 +162,7 @@ uint32_t crec_flash_physical_get_protect_flags(void)
*/
uint32_t crec_flash_physical_get_valid_flags(void)
{
- return EC_FLASH_PROTECT_RO_AT_BOOT |
- EC_FLASH_PROTECT_RO_NOW |
+ return EC_FLASH_PROTECT_RO_AT_BOOT | EC_FLASH_PROTECT_RO_NOW |
EC_FLASH_PROTECT_ALL_NOW;
}
@@ -182,7 +179,8 @@ uint32_t crec_flash_physical_get_writable_flags(uint32_t cur_flags)
wp_status = spi_flash_check_wp();
- if (wp_status == SPI_WP_NONE || (wp_status == SPI_WP_HARDWARE &&
+ if (wp_status == SPI_WP_NONE ||
+ (wp_status == SPI_WP_HARDWARE &&
!(cur_flags & EC_FLASH_PROTECT_GPIO_ASSERTED)))
ret = EC_FLASH_PROTECT_RO_AT_BOOT | EC_FLASH_PROTECT_RO_NOW;
|
Increased max actors and triggers to 16 | #include <gb/gb.h>
#include "game.h"
-#define MAX_ACTORS 9
-#define MAX_TRIGGERS 8
+#define MAX_ACTORS 16
+#define MAX_TRIGGERS 16
#define ACTOR_HEIGHT 16
#define ACTOR_WIDTH 16
#define ACTOR_HALF_WIDTH 8
|
async_posix: raise a memory allocation error if we fail to allocate stack memory | # include <stddef.h>
# include <unistd.h>
+# include <openssl/err.h>
#define STACKSIZE 32768
@@ -45,6 +46,7 @@ int async_fibre_makecontext(async_fibre *fibre)
makecontext(&fibre->fibre, async_start_func, 0);
return 1;
}
+ ERR_raise(ERR_LIB_ASYNC, ERR_R_MALLOC_FAILURE);
} else {
fibre->fibre.uc_stack.ss_sp = NULL;
}
|
Allocate more linear memory, for now | @@ -372,7 +372,7 @@ M3Result m3_FindFunction (IM3Function * o_function, IM3Runtime i_runtime, cons
function = NULL;
}
}
- else result = c_m3Err_functionLookupFailed;
+ else result = ErrorModule (c_m3Err_functionLookupFailed, i_runtime->modules, "'%s'", i_functionName);
* o_function = function;
@@ -399,7 +399,7 @@ M3Result m3_CallWithArgs (IM3Function i_function, uint32_t i_argc, const char
IM3FuncType ftype = i_function->funcType;
#if d_m3AllocateLinearMemory
-_ (Module_EnsureMemorySize (module, & i_function->module->memory, 3000000));
+_ (Module_EnsureMemorySize (module, & i_function->module->memory, 16777216));
#endif
u8 * linearMemory = module->memory.wasmPages;
@@ -486,7 +486,7 @@ M3Result m3_CallMain (IM3Function i_function, uint32_t i_argc, const char * co
IM3Runtime env = module->runtime;
#if d_m3AllocateLinearMemory
-_ (Module_EnsureMemorySize (module, & i_function->module->memory, 3000000));
+_ (Module_EnsureMemorySize (module, & i_function->module->memory, 16777216));
#endif
u8 * linearMemory = module->memory.wasmPages;
|
hw/mcu/da1469x: Load trim values from OTP on boot | #include "mcu/da1469x_lpclk.h"
#include "mcu/da1469x_pd.h"
#include "mcu/da1469x_pdc.h"
+#include "mcu/da1469x_trimv.h"
#include "hal/hal_system.h"
#include "os/os_cputime.h"
@@ -58,6 +59,8 @@ hal_system_init(void)
g_hal_reset_reason = 0;
}
#endif
+
+ da1469x_trimv_init_from_otp();
}
void
|
imageinput: prevent text selection on all statues
fixes urbit/landscape#893 | @@ -46,7 +46,13 @@ const prompt = (field, focus, uploading, meta, clickUploadButton) => {
const uploadingStatus = (uploading, meta) => {
if (uploading && meta.error === undefined) {
return (
- <Text position='absolute' left={2} top={2} gray>
+ <Text
+ position="absolute"
+ left={2}
+ top={2}
+ gray
+ onSelect={e => e.preventDefault}
+ >
Uploading...
</Text>
);
@@ -63,6 +69,7 @@ const errorRetry = (meta, uploading, clickUploadButton) => {
top='6px'
color='red'
style={{ pointerEvents: 'none' }}
+ onSelect={e => e.preventDefault}
>
{meta.error}{', '}please{' '}
<Text
|
Add quotes around perl scripts
Otherwise, it seems nmake doesn't invoke perl properly. | @@ -744,7 +744,7 @@ EOF
$args{generator}->[1] || platform->dsoname($args{product});
return <<"EOF";
$target: $gen0 $deps $mkdef
- "\$(PERL)" $mkdef$ord_ver --ordinals $gen0 --name $ord_name --OS windows > $target
+ "\$(PERL)" "$mkdef"$ord_ver --ordinals $gen0 --name $ord_name --OS windows > $target
EOF
} elsif (platform->isasm($args{src})) {
#
@@ -760,7 +760,7 @@ EOF
my $generator;
if ($gen0 =~ /\.pl$/) {
- $generator = '"$(PERL)"'.$gen_incs.' '.$gen0.$gen_args
+ $generator = '"$(PERL)"'.$gen_incs.' "'.$gen0.'"'.$gen_args
.' "$(PERLASM_SCHEME)"'.$incs.' '.$cppflags.$defs.' $(PROCESSSOR)';
} elsif ($gen0 =~ /\.S$/) {
$generator = undef;
@@ -817,7 +817,7 @@ EOF
$gen0 = platform->bin($gen0);
return <<"EOF";
$args{src}: $gen0 $deps "\$(BLDDIR)\\util\\wrap.pl"
- "\$(PERL)" "\$(BLDDIR)\\util\\wrap.pl" $gen0$gen_args > \$@
+ "\$(PERL)" "\$(BLDDIR)\\util\\wrap.pl" "$gen0"$gen_args > \$@
EOF
} else {
#
@@ -825,7 +825,7 @@ EOF
#
return <<"EOF";
$args{src}: "$gen0" $deps
- "\$(PERL)"$gen_incs $gen0$gen_args > \$@
+ "\$(PERL)"$gen_incs "$gen0"$gen_args > \$@
EOF
}
}
|
assign default error message | @@ -845,6 +845,8 @@ static const char *stbi__g_failure_reason;
STBIDEF const char *stbi_failure_reason(void)
{
+ if (stbi__g_failure_reason == NULL)
+ stbi__g_failure_reason = "unknwon error, refer error message before assignment";
return stbi__g_failure_reason;
}
|
Fix some glyph value behaviors | @@ -21,6 +21,7 @@ static inline Glyph glyph_lowered(Glyph c) {
// if the glyph is capitalized.
static inline Usz semantic_index_of_glyph(Glyph c) {
Glyph c0 = glyph_lowered(c);
+ if (c0 == '.') return 0;
for (Usz i = 0; i < Glyphs_array_num; ++i) {
if (indexed_glyphs[i] == c0)
return i;
@@ -97,7 +98,7 @@ static inline void oper_move_relative_or_explode(Gbuffer gbuf, Mbuffer mbuf,
#define OPER_PEEK_RELATIVE(_delta_y, _delta_x) \
gbuffer_peek_relative(gbuffer, height, width, y, x, _delta_y, _delta_x)
#define OPER_POKE_RELATIVE(_delta_y, _delta_x, _glyph) \
- gbuffer_poke_relative(gbuffer, height, width, y, x, _delta_x, _delta_y, \
+ gbuffer_poke_relative(gbuffer, height, width, y, x, _delta_y, _delta_x, \
_glyph)
#define OPER_POKE_SELF(_glyph) OPER_POKE_ABSOLUTE(y, x, _glyph)
@@ -183,10 +184,8 @@ OPER_END
OPER_PHASE_2(Add)
Glyph inp0 = OPER_PEEK_RELATIVE(0, 1);
Glyph inp1 = OPER_PEEK_RELATIVE(0, 2);
- if (inp0 != '.' && inp1 != '.') {
Glyph g = glyphs_sum(inp0, inp1);
OPER_POKE_RELATIVE(1, 0, g);
- }
OPER_END
OPER_PHASE_0(Modulo)
@@ -199,10 +198,8 @@ OPER_END
OPER_PHASE_2(Modulo)
Glyph inp0 = OPER_PEEK_RELATIVE(0, 1);
Glyph inp1 = OPER_PEEK_RELATIVE(0, 2);
- if (inp0 != '.' && inp1 != '.') {
Glyph g = glyphs_mod(inp0, inp1);
OPER_POKE_RELATIVE(1, 0, g);
- }
OPER_END
OPER_PHASE_0(Increment)
|
[RNDIS]fix speed on HS | @@ -421,7 +421,7 @@ static rt_err_t _rndis_query_response(ufunction_t func,rndis_query_msg_t msg)
case OID_GEN_LINK_SPEED:
resp = _create_resp(4);
if(resp == RT_NULL) break;
- _set_resp(resp, func->device->dcd->device_is_hs ? (480UL * 1000 *1000) : (12UL * 1000 * 1000) / 100);
+ _set_resp(resp, (func->device->dcd->device_is_hs ? (480UL * 1000 *1000) : (12UL * 1000 * 1000)) / 100);
break;
case OID_GEN_MEDIA_CONNECT_STATUS:
|
abis/mlibc: Add struct in6_pktinfo | @@ -32,6 +32,11 @@ struct in6_addr {
#define s6_addr16 __in6_union.__s6_addr16
#define s6_addr32 __in6_union.__s6_addr32
+struct in6_pktinfo {
+ struct in6_addr ipi6_addr;
+ uint32_t ipi6_ifindex;
+};
+
struct sockaddr_in6 {
sa_family_t sin6_family;
in_port_t sin6_port;
|
Flush terminal setup commands before finishing init in xterm.
Otherwise the console size can be wrong at first. | @@ -696,6 +696,7 @@ TCOD_Context* TCOD_renderer_init_xterm(
if (columns > 0 && rows > 0) fprintf(stdout, "\x1b[8;%i;%it", rows, columns);
else if (pixel_width > 0 && pixel_height > 0) fprintf(stdout, "\x1b[4;%i;%it", pixel_height, pixel_width);
if (window_title) fprintf(stdout, "\x1b]0;%s\x07", window_title);
+ fflush(stdout);
g_terminal_size_state.lock = SDL_CreateMutex();
SDL_Init(SDL_INIT_VIDEO); // Need SDL init to get keysyms
data->input_thread = SDL_CreateThread(&xterm_handle_input, "input thread", NULL);
|
fpgainfo: silence errors from port
When dfl-port.X/errors is empty, silence the errors from
'fpgainfo errors all'. | @@ -357,9 +357,8 @@ fpga_result errors_command(fpga_token *tokens, int num_tokens, int argc,
res = fpgaGetProperties(tokens[i], &props);
if (res == FPGA_OK) {
res = fpgaPropertiesGetNumErrors(props, &num_errors);
- fpgainfo_print_err("reading errors from properties", res);
- if (num_errors != 0) {
+ if ((res == FPGA_OK) && (num_errors != 0)) {
int j;
errinfos = (struct fpga_error_info *)calloc(
num_errors, sizeof(*errinfos));
@@ -379,10 +378,12 @@ fpga_result errors_command(fpga_token *tokens, int num_tokens, int argc,
strnlen(errinfos[j].name, 4096));
upcase_first(errinfos[j].name);
}
- }
print_errors_info(tokens[i], props, errinfos, num_errors);
+ }
+
destroy_and_free:
+ if (errinfos)
free(errinfos);
errinfos = NULL;
fpgaDestroyProperties(&props);
|
Tweak 320x240 init to avoid flicker | @@ -115,17 +115,17 @@ namespace pimoroni {
if(width == 320 && height == 240) {
command(reg::PORCTRL, 5, "\x0c\x0c\x00\x33\x33");
- command(reg::GCTRL, 1, "\x74");
- command(reg::VCOMS, 1, "\x2f");
- command(reg::LCMCTRL, 1, "\x22");
+ command(reg::GCTRL, 1, "\x35");
+ command(reg::VCOMS, 1, "\x1f");
+ command(reg::LCMCTRL, 1, "\x2c");
command(reg::VDVVRHEN, 1, "\x01");
- command(reg::VRHS, 1, "\x19");
+ command(reg::VRHS, 1, "\x12");
command(reg::VDVS, 1, "\x20");
command(reg::FRCTRL2, 1, "\x0f");
command(reg::PWCTRL1, 2, "\xa4\xa1");
command(0xd6, 1, "\xa1"); // ???
- command(reg::GMCTRP1, 14, "\xF0\x08\x0F\x0B\x0B\x07\x34\x43\x4B\x38\x14\x13\x2C\x31");
- command(reg::GMCTRN1, 14, "\xF0\x0C\x11\x09\x08\x24\x34\x33\x4A\x3A\x16\x16\x2E\x32");
+ command(reg::GMCTRP1, 14, "\xD0\x08\x11\x08\x0C\x15\x39\x33\x50\x36\x13\x14\x29\x2D");
+ command(reg::GMCTRN1, 14, "\xD0\x08\x10\x08\x06\x06\x39\x44\x51\x0B\x16\x14\x2F\x31");
}
command(reg::INVON); // set inversion mode
@@ -164,7 +164,7 @@ namespace pimoroni {
caset[1] = 319;
raset[0] = 0;
raset[1] = 239;
- madctl = 0;
+ madctl = 0x70;
}
// Byte swap the 16bit rows/cols values
|
Fix OFFLOAD_ARCH_gfxABC in Makefile.defs.
This ensures the macro matches --offload-arch by honoring
AOMP_GPU and ROCR_VISIBLE_DEVICES. The first visible GPU
found when setting ROCR_VISIBLE_DEVICES will be used.
Spacing adjustments. | @@ -62,10 +62,19 @@ else
INSTALLED_GPU = sm_50
else
ifneq ($(CBL),1)
+ # Honor AOMP_GPU.
+ ifneq ("$(AOMP_GPU)","")
+ INSTALLED_GPU = $(shell echo $(AOMP_GPU))
+ # Honor ROCR_VISIBLE_DEVICES. Returns first GPU in list.
+ else ifneq ("$(ROCR_VISIBLE_DEVICES)","")
+ INSTALLED_GPU = $(shell $(AOMP)/bin/offload-arch -c | grep -oP gfx.+?\(?=:\))
+ # Default to rocm_agent_enumerator. Returns first GPU in list.
+ else
INSTALLED_GPU = $(shell $(AOMP)/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
endif
endif
endif
+endif
AOMP_GPU ?= $(INSTALLED_GPU)
CC = $(AOMP)/bin/clang
|
fixed small bug in file handling | @@ -587,9 +587,8 @@ if(showinfo2 == TRUE)
hcxrecord->mac_ap.addr[0], hcxrecord->mac_ap.addr[1], hcxrecord->mac_ap.addr[2], hcxrecord->mac_ap.addr[3], hcxrecord->mac_ap.addr[4], hcxrecord->mac_ap.addr[5],
hcxrecord->mac_sta.addr[0], hcxrecord->mac_sta.addr[1], hcxrecord->mac_sta.addr[2], hcxrecord->mac_sta.addr[3], hcxrecord->mac_sta.addr[4], hcxrecord->mac_sta.addr[5],
essidstring);
+ fclose(fhshowinfo2);
}
-
-
return;
}
/*===========================================================================*/
|
docs: Add section about conditional settings | @@ -352,6 +352,47 @@ use the flash area named ``FLASH_AREA_NFFS`` in the ``syscfg.yml`` file.
syscfg.vals:
NFFS_FLASH_AREA: FLASH_AREA_NFFS
+Conditional Settings
+~~~~~~~~~~~~~~~~~~~~
+
+Setings in most Mynewt YAML files can be made conditional on syscfg
+settings. For example, a package might depend on a second package
+*only if a syscfg setting has a particular value*. The condition can
+be the value of a single syscfg setting or an arbitrary expression
+involving many settings.
+
+Examples of Conditional Settings
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Example 6
+`````````
+
+In this example, a package depends on ``lib/pkg2`` only if
+``MY_SETTING`` has a true value.
+
+
+.. code-block:: yaml
+
+ pkg.deps.MY_SETTING:
+ # Only depend on pkg2 if MY_SETTING is true.
+ - lib/pkg2
+
+A setting is "true" if it has a value other than 0 or the empty string.
+Undefined settings are not true.
+
+Example 7
+`````````
+
+In this example, a package overrides the setting ``FOO`` only if
+``BAR`` is greater than 5 and ``BAZ`` is not true.
+
+
+.. code-block:: yaml
+
+ syscfg.vals.'(BAR > 5 && !BAZ):
+ # Only override FOO if BAR is greater than 5 and BAZ is untrue.
+ FOO: 35
+
Generated syscfg.h and Referencing System Configuration Settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -639,36 +680,3 @@ function:
nmgr_shell_pkg_init();
}
#endif
-
-Conditional Configurations
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-You can use the system configuration setting values to conditionally
-specify parameter values in ``pkg.yml`` and ``syscfg.yml`` files. The
-syntax is:
-
-.. code-block:: yaml
-
- parameter_name.PKGA_SYSCFG_NAME:
- parameter_value
-
-This specifies that ``parameter_value`` is only set for
-``parameter_name`` if the ``PKGA_SYSCFG_NAME`` configuration setting
-value is non-zero. Here is an example from the ``libs/os`` package
-``pkg.yml`` file:
-
-.. code-block:: yaml
-
- pkg.deps:
- - "@apache-mynewt-core/sys/sysinit"
- - "@apache-mynewt-core/util/mem"
-
- pkg.deps.OS_CLI
- - "@apache-mynewt-core/sys/shell"
-
-This example specifies that the ``os`` package depends on the
-``sysinit`` and ``mem`` packages, and also depends on the ``shell``
-package when ``OS_CLI`` is enabled.
-
-The newt tool aborts the build when it detects circular conditional
-dependencies.
|
doc: Update document for --pm_notify_channel
Update the document for new parameter --pm_notify_channel. | @@ -326,3 +326,14 @@ Here are descriptions for each of these ``acrn-dm`` command line parameters:
level ranges from 1 (``error``) up to 5 (``debug``).
By default, the log severity level is set to 4 (``info``).
+
+ * - :kbd:`--pm_notify_channel <channel>`
+ - This option is used to define which channel could be used DM to
+ communicate with VM about power management event.
+
+ ACRN supports two channels: ``ioc`` and ``power button``.
+
+ usage::
+ --pm_notify_channel ioc
+
+ Use ioc as power management event motify channel.
|
out_datadog: use new upstream prototype for tls handling | @@ -196,10 +196,10 @@ struct flb_out_datadog *flb_datadog_conf_create(struct flb_output_instance *ins,
ctx->proxy_host,
ctx->proxy_port,
io_flags,
- &ins->tls);
+ ins->tls);
}
else {
- upstream = flb_upstream_create(config, ctx->host, ctx->port, io_flags, &ins->tls);
+ upstream = flb_upstream_create(config, ctx->host, ctx->port, io_flags, ins->tls);
}
if (!upstream) {
|
allow popAndForget | @@ -59,7 +59,6 @@ Item popAndForget(PriorityQueue *queue, bool isConcept, long currentTime)
{
//1. pop an item
Item item = PriorityQueue_PopMax(queue);
- return item;
if(item.address == 0)
{
return item;
|
libbpf-tool: don't ignore LDFLAGS
Packagers need to be able set linker options according to their
distribution guidelines. | @@ -80,7 +80,7 @@ $(OUTPUT) $(OUTPUT)/libbpf:
$(APPS): %: $(OUTPUT)/%.o $(LIBBPF_OBJ) $(COMMON_OBJ) | $(OUTPUT)
$(call msg,BINARY,$@)
- $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
+ $(Q)$(CC) $(CFLAGS) $^ $(LDFLAGS) -lelf -lz -o $@
$(patsubst %,$(OUTPUT)/%.o,$(APPS)): %.o: %.skel.h
|
window/autotest: testing edge case (trying to index out of range) | @@ -98,6 +98,7 @@ void autotest_windowf()
windowf_index(w, 7, &x); CONTEND_EQUALITY(x, 3);
windowf_index(w, 8, &x); CONTEND_EQUALITY(x, 3);
windowf_index(w, 9, &x); CONTEND_EQUALITY(x, 3);
+ CONTEND_INEQUALITY( windowf_index(w,999, &x), LIQUID_OK); // out of range
// push 4 more elements
// 7 6 3 3 3 3 5 5 5 5
|
[bsp][stm32f429-disco] Remove code about littlevgl | #include <gdb_stub.h>
#endif
-#include "drv_touch.h"
-
-#ifdef PKG_USING_LITTLEVGL2RTT
-#include "littlevgl2rtt.h"
-#endif
-
-static void rt_touch_thread_entry(void *parameter)
-{
-#ifdef PKG_USING_LITTLEVGL2RTT
- int16_t x;
- int16_t y;
-#endif
- struct touch_state ts;
- while(1)
- {
- touch_get_state(&ts);
-
-#ifdef PKG_USING_LITTLEVGL2RTT
- if(ts.pressed)
- {
- x = (3706 - ts.x) / 14;
- y = (-461 + ts.y) / 10.5;
-
- littlevgl2rtt_send_input_event(x, y, LITTLEVGL2RTT_INPUT_DOWN);
- }
- else
- littlevgl2rtt_send_input_event(-1, -1, LITTLEVGL2RTT_INPUT_UP);
-#endif
- rt_thread_mdelay(100);
- }
-}
void rt_init_thread_entry(void* parameter)
{
@@ -88,16 +57,6 @@ void rt_init_thread_entry(void* parameter)
rt_components_init();
- rt_device_t tscreen = rt_device_find("touch");
- rt_device_open(tscreen, RT_DEVICE_FLAG_RDWR);
-
- tid = rt_thread_create("touch",
- rt_touch_thread_entry, RT_NULL,
- 1024, 4, 20);
-
- if (tid != RT_NULL)
- rt_thread_startup(tid);
-
}
int rt_application_init()
|
Remove duplicate PEB address checks | @@ -12252,10 +12252,6 @@ NTSTATUS PhGetProcessImageBaseAddress(
if (!NT_SUCCESS(status))
return status;
- // No PEB for System and minimal/pico processes. (dmex)
- if (!pebBaseAddress)
- return STATUS_UNSUCCESSFUL;
-
status = NtReadVirtualMemory(
ProcessHandle,
PTR_ADD_OFFSET(pebBaseAddress, UFIELD_OFFSET(PEB32, ImageBaseAddress)),
@@ -12279,10 +12275,6 @@ NTSTATUS PhGetProcessImageBaseAddress(
if (!NT_SUCCESS(status))
return status;
- // No PEB for System and minimal/pico processes. (dmex)
- if (!pebBaseAddress)
- return STATUS_UNSUCCESSFUL;
-
status = NtReadVirtualMemory(
ProcessHandle,
PTR_ADD_OFFSET(pebBaseAddress, UFIELD_OFFSET(PEB, ImageBaseAddress)),
@@ -12621,10 +12613,6 @@ NTSTATUS PhGetProcessIsPosix(
if (!NT_SUCCESS(status))
return status;
- // No PEB for System and minimal/pico processes. (dmex)
- if (!pebBaseAddress)
- return STATUS_UNSUCCESSFUL;
-
status = NtReadVirtualMemory(
ProcessHandle,
PTR_ADD_OFFSET(pebBaseAddress, UFIELD_OFFSET(PEB32, ImageSubsystem)),
@@ -12641,10 +12629,6 @@ NTSTATUS PhGetProcessIsPosix(
if (!NT_SUCCESS(status))
return status;
- // No PEB for System and minimal/pico processes. (dmex)
- if (!pebBaseAddress)
- return STATUS_UNSUCCESSFUL;
-
status = NtReadVirtualMemory(
ProcessHandle,
PTR_ADD_OFFSET(pebBaseAddress, UFIELD_OFFSET(PEB, ImageSubsystem)),
|
No ordered boosting for distributed training | @@ -8,7 +8,6 @@ template<typename TFullIndexType, typename TIsCaching>
static void CalcStatsImpl(const TIsCaching& isCaching,
const TVector<TFullIndexType>& singleIdx,
const TCalcScoreFold& fold,
- bool isPlainMode,
const TStatsIndexer& indexer,
int depth,
int splitStatsCount,
@@ -19,6 +18,7 @@ static void CalcStatsImpl(const TIsCaching& isCaching,
const auto& bt = fold.BodyTailArr[bodyTailIdx];
for (int dim = 0; dim < approxDimension; ++dim) {
TBucketStats* stats = splitStats + (bodyTailIdx * approxDimension + dim) * splitStatsCount;
+ const bool isPlainMode = true;
CalcStatsKernel(isCaching, singleIdx, fold, isPlainMode, indexer, depth, bt, dim, stats);
}
}
@@ -39,18 +39,19 @@ TStats3D CalcStats3D(const TAllFeatures& af,
decltype(auto) SelectCalcStatsImpl = [&] (auto isCaching, const TCalcScoreFold& fold, int splitStatsCount, auto* splitStats) {
const bool isPlainMode = IsPlainMode(fitParams.BoostingOptions->BoostingType);
+ Y_VERIFY(isPlainMode, "Only plain mode is supported for distributed training");
if (bucketIndexBits <= 8) {
TVector<ui8> singleIdx;
BuildSingleIndex(fold, af, allCtrs, split, indexer, &singleIdx);
- CalcStatsImpl(isCaching, singleIdx, fold, isPlainMode, indexer, depth, splitStatsCount, GetDataPtr(*splitStats));
+ CalcStatsImpl(isCaching, singleIdx, fold, indexer, depth, splitStatsCount, GetDataPtr(*splitStats));
} else if (bucketIndexBits <= 16) {
TVector<ui16> singleIdx;
BuildSingleIndex(fold, af, allCtrs, split, indexer, &singleIdx);
- CalcStatsImpl(isCaching, singleIdx, fold, isPlainMode, indexer, depth, splitStatsCount, GetDataPtr(*splitStats));
+ CalcStatsImpl(isCaching, singleIdx, fold, indexer, depth, splitStatsCount, GetDataPtr(*splitStats));
} else if (bucketIndexBits <= 32) {
TVector<ui32> singleIdx;
BuildSingleIndex(fold, af, allCtrs, split, indexer, &singleIdx);
- CalcStatsImpl(isCaching, singleIdx, fold, isPlainMode, indexer, depth, splitStatsCount, GetDataPtr(*splitStats));
+ CalcStatsImpl(isCaching, singleIdx, fold, indexer, depth, splitStatsCount, GetDataPtr(*splitStats));
} else {
CB_ENSURE(false, "too deep or too much splitsCount for score calculation");
}
@@ -83,17 +84,12 @@ TVector<TScoreBin> GetScoreBins(const TStats3D& stats, ESplitType splitType, int
const int splitStatsCount = stats.BucketCount * stats.MaxLeafCount;
const int bucketCount = stats.BucketCount;
const float l2Regularizer = static_cast<const float>(fitParams.ObliviousTreeOptions->L2Reg);
- const bool isPlainMode = IsPlainMode(fitParams.BoostingOptions->BoostingType);
const int leafCount = 1 << depth;
const TStatsIndexer indexer(bucketCount);
TVector<TScoreBin> scoreBin(bucketCount);
for (int statsIdx = 0; statsIdx * splitStatsCount < bucketStats.ysize(); ++statsIdx) {
const TBucketStats* stats = GetDataPtr(bucketStats) + statsIdx * splitStatsCount;
- if (isPlainMode) {
UpdateScoreBin(stats, leafCount, indexer, splitType, l2Regularizer, /*isPlainMode=*/std::true_type(), &scoreBin);
- } else {
- UpdateScoreBin(stats, leafCount, indexer, splitType, l2Regularizer, /*isPlainMode=*/std::false_type(), &scoreBin);
- }
}
return scoreBin;
}
|
Docs: Only patch PRBM for Darwin/macOS | @@ -21,7 +21,12 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "UNC", 0x00000000)
{
Method (_INI, 0, NotSerialized)
{
+ // In most cases this patch does benefit all operating systems,
+ // yet on select pre-Windows 10 it may cause issues.
+ // Remove If (_OSI ("Darwin")) in case you have none.
+ If (_OSI ("Darwin")) {
PRBM = 0
}
}
}
+}
|
Fix channel check in calibration | @@ -734,7 +734,7 @@ uint8_t CalibrateTxSetup()
}
EndBatch();*/
- if(x0020val & 0x3 == 1)
+ if((x0020val & 0x3) == 1)
Modify_SPI_Reg_bits(PD_RX_AFE1, 0);
else
Modify_SPI_Reg_bits(PD_RX_AFE2, 0);
@@ -988,7 +988,7 @@ uint8_t CalibrateRxSetup()
Modify_SPI_Reg_bits(0x0084, MSBLSB(10, 6), rp_calib_bias);
}*/
//AFE
- if(x0020val & 0x3 == 1)
+ if((x0020val & 0x3) == 1)
Modify_SPI_Reg_bits(PD_TX_AFE1, 0);
else
Modify_SPI_Reg_bits(PD_TX_AFE2, 0);
|
Add some documentation which describes how to enable the profile recorder | - [Log enricher based recording](#log-enricher-based-recording)
- [eBPF based recording](#ebpf-based-recording)
- [Merging per-container profile instances](#merging-per-container-profile-instances)
+ - [Disable profile recording](#disable-profile-recording)
- [Create a SELinux Profile](#create-a-selinux-profile)
- [Apply a SELinux profile to a pod](#apply-a-selinux-profile-to-a-pod)
- [Make a SELinux profile permissive](#make-a-selinux-profile-permissive)
@@ -768,6 +769,16 @@ including the `mknod` syscall:
- mknod
```
+#### Disable profile recording
+
+Profile recorder controller along with the corresponding sidecar container is disabled
+when neither `enableBpfRecorder` nor `enableLogEnricher` is set in the SPOD configuration, and
+automatically enabled when either one of them is on.
+
+Also, when running the daemon in standalone mode is possible to switch on the profile recorder
+controller by providing the `with-recording` command line argument or setting the `ENABLE_RECORDING`
+environment variable.
+
## Create a SELinux Profile
There are two kinds that can be used to define a SELinux profile - `SelinuxProfile` and `RawSelinuxProfile`.
|
Remove debug stuff accidently committed. | @@ -96,7 +96,6 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
if (stcb->sctp_socket == NULL) {
return (calc);
}
-SCTP_PRINTF("sctp_calc_rwnd: sb_cc=%u, size_on_reasm_queue=%u, cnt_on_reasm_queue=%u, size_on_all_streams=%u, cnt_on_all_streams=%u, my_rwnd_control_len=%u\n", stcb->asoc.sb_cc, asoc->size_on_reasm_queue, asoc->cnt_on_reasm_queue, asoc->size_on_all_streams, asoc->cnt_on_all_streams, asoc->my_rwnd_control_len);
KASSERT(asoc->cnt_on_reasm_queue > 0 || asoc->size_on_reasm_queue == 0,
("size_on_reasm_queue is %u", asoc->size_on_reasm_queue));
@@ -824,7 +823,6 @@ sctp_handle_old_unordered_data(struct sctp_tcb *stcb,
struct sctp_queued_to_read *nc;
int cnt_added;
-printf("Entering %s\n", __func__);
if (control->first_frag_seen == 0) {
/* Nothing we can do, we have not seen the first piece yet */
return (1);
@@ -933,7 +931,6 @@ restart:
if ((control->length > pd_point) && (strm->pd_api_started == 0)) {
strm->pd_api_started = 1;
control->pdapi_started = 1;
-printf("Strarting PD-API\n");
sctp_add_to_readq(stcb->sctp_ep, stcb, control,
&stcb->sctp_socket->so_rcv, control->end_added,
inp_read_lock_held, SCTP_SO_NOT_LOCKED);
@@ -953,8 +950,6 @@ sctp_inject_old_unordered_data(struct sctp_tcb *stcb,
{
struct sctp_tmit_chunk *at;
int inserted;
-
-printf("Entering %s\n", __func__);
/*
* Here we need to place the chunk into the control structure
* sorted in the correct order.
@@ -1087,7 +1082,6 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc,
uint32_t pd_point;
int ret = 0;
-printf("Entering %s\n", __func__);
if (stcb->sctp_socket) {
pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT,
stcb->sctp_ep->partial_delivery_point);
@@ -1139,7 +1133,7 @@ printf("Entering %s\n", __func__);
control,
&stcb->sctp_socket->so_rcv, control->end_added,
inp_read_lock_held, SCTP_SO_NOT_LOCKED);
-printf("String PD_API\n");
+
break;
}
}
@@ -1379,7 +1373,6 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
int do_wakeup, unordered;
uint32_t lenadded;
-printf("Entering %s\n", __func__);
strm = &asoc->strmin[control->sinfo_stream];
/*
* For old un-ordered data chunks.
|
update comments, add examples | @@ -124,6 +124,9 @@ add_argument(cs_insn* asm_inst)
// In this example, add_argument is 0x58:
// 000000000063a083 (04) 4883c458 ADD RSP, 0x58
// 000000000063a087 (01) c3 RET
+ // In this example, add_argument is 0xffffffffffffff80:
+ // 000000000046f833 (04) 4883ec80 SUB RSP, $0xffffffffffffff80
+ // 000000000046f837 (01) c3 RET
if (asm_inst->size == 4) {
unsigned char* inst_addr = (unsigned char*)asm_inst->address;
return ((unsigned char*)inst_addr)[3];
@@ -132,6 +135,9 @@ add_argument(cs_insn* asm_inst)
// In this example, add_argument is 0x80:
// 00000000004a9cc9 (07) 4881c480000000 ADD RSP, 0x80
// 00000000004a9cd0 (01) c3 RET
+ // In this example, add_argument is 0xffffffffffffff80:
+ // 000000000046f833 (07) 4883ec80000000 SUB RSP, $0xffffffffffffff80
+ // 000000000046f837 (01) c3 RET
if (asm_inst->size == 7) {
unsigned char* inst_addr = (unsigned char*)asm_inst->address;
// x86_64 is little-endian.
@@ -229,7 +235,7 @@ patch_return_addrs(funchook_t *funchook,
(char*)asm_inst[i].op_str);
// If the current instruction is a RET
- // we want to patch the ADD immediately before it.
+ // we want to patch the ADD or SUB immediately before it.
uint32_t add_arg = 0;
if ((!strcmp((const char*)asm_inst[i].mnemonic, "ret") &&
asm_inst[i].size == 1) &&
@@ -1004,7 +1010,7 @@ c_getdents(char *stackaddr)
uint64_t rc = *(uint64_t *)(stackaddr + 0x28);
uint64_t initialTime = getTime();
- funcprint("Scope: getdents dirfd %ld\n", dirfd);
+ funcprint("Scope: getdents dirfd %ld rc %ld\n", dirfd, rc);
doRead(dirfd, initialTime, (rc != -1), NULL, rc, "go_getdents", BUF, 0);
}
@@ -1028,7 +1034,7 @@ c_unlinkat(char *stackaddr)
}
funcprint("Scope: unlinkat dirfd %ld pathname %s flags %ld\n", dirfd, pathname, flags);
- doDelete(pathname, "unlinkat");
+ doDelete(pathname, "go_unlinkat");
if (pathname) free(pathname);
}
|
Bump AVR firmware version to 0x26330500
Supports nwk and ieee source address for APSDE-DATA.indication.
This helps to easily detect nwk address changes which brings more
stability.
There were cases where incoming requests were ignored because the new
nwk address was unknown. | @@ -74,7 +74,7 @@ DEFINES += GIT_COMMMIT=\\\"$$GIT_COMMIT\\\" \
# which shall be used in order to support all features for this software release (case sensitive)
DEFINES += GW_AUTO_UPDATE_AVR_FW_VERSION=0x260b0500
DEFINES += GW_AUTO_UPDATE_R21_FW_VERSION=0x26420700
-DEFINES += GW_MIN_AVR_FW_VERSION=0x26320500
+DEFINES += GW_MIN_AVR_FW_VERSION=0x26330500
DEFINES += GW_MIN_R21_FW_VERSION=0x26480700
# Minimum version of the deRFusb23E0X firmware
|
sha/asm/keccak1600-armv4.pl: adapt for multi-platform. | # Cortex-Mx, x>=3. Otherwise, non-NEON results for NEON-capable
# processors are presented mostly for reference purposes.
+$flavour = shift;
+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
+
+if ($flavour && $flavour ne "void") {
+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+ ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
+ ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
+ die "can't locate arm-xlate.pl";
+
+ open STDOUT,"| \"$^X\" $xlate $flavour $output";
+} else {
+ open STDOUT,">$output";
+}
+
my @C = map("r$_",(0..9));
my @E = map("r$_",(10..12,14));
@@ -96,6 +111,8 @@ my @D = map(8*$_, (25..29));
my @T = map([ 8*$_, 8*($_+1), 8*($_+2), 8*($_+3), 8*($_+4) ], (30,35,40,45,50));
$code.=<<___;
+#include "arm_arch.h"
+
.text
#if defined(__thumb2__)
@@ -1044,6 +1061,7 @@ ___
}
$code.=<<___;
+#if __ARM_MAX_ARCH__>=7
.fpu neon
.type iotas64, %object
@@ -1545,6 +1563,7 @@ SHA3_squeeze_neon:
.Lsqueeze_neon_done:
ldmia sp!, {r4-r6,pc}
.size SHA3_squeeze_neon,.-SHA3_squeeze_neon
+#endif
.asciz "Keccak-1600 absorb and squeeze for ARMv4/NEON, CRYPTOGAMS by <appro\@openssl.org>"
.align 2
___
@@ -1573,13 +1592,11 @@ ___
}
}
-$output=pop;
-open STDOUT,">$output";
-
foreach (split($/,$code)) {
s/\`([^\`]*)\`/eval $1/ge;
s/^\s+(ldr|str)\.([lh])\s+(r[0-9]+),\s*(\[.*)/ldrd($1,$2,$3,$4)/ge or
+ s/\b(ror|ls[rl])\s+(r[0-9]+.*)#/mov $2$1#/g or
s/\bret\b/bx lr/g or
s/\bbx\s+lr\b/.word\t0xe12fff1e/g; # make it possible to compile with -march=armv4
|
it's possible sock may have gotten free'd by callback above | @@ -1954,14 +1954,23 @@ static void proceed_handshake_undetermined(h2o_socket_t *sock)
if (ret == PTLS_ERROR_IN_PROGRESS && wbuf->off == 0) {
/* we aren't sure if the picotls can process the handshake, retain handshake transcript and replay on next occasion */
ptls_free(ptls);
+#if PTLS_OPENSSL_HAVE_ASYNC
+ sock->ssl->async.undetermined.ptls = NULL;
+#endif
} else if (ret == PTLS_ALERT_PROTOCOL_VERSION) {
/* the client cannot use tls1.3, fallback to openssl */
ptls_free(ptls);
+#if PTLS_OPENSSL_HAVE_ASYNC
+ sock->ssl->async.undetermined.ptls = NULL;
+#endif
create_ossl(sock);
proceed_handshake_openssl(sock);
} else {
/* picotls is responsible for handling the handshake */
sock->ssl->ptls = ptls;
+#if PTLS_OPENSSL_HAVE_ASYNC
+ sock->ssl->async.undetermined.ptls = NULL;
+#endif
sock->ssl->handshake.server.async_resumption.state = ASYNC_RESUMPTION_STATE_COMPLETE;
h2o_buffer_consume(&sock->ssl->input.encrypted, consumed);
/* stop reading, send response */
@@ -1983,9 +1992,6 @@ static void proceed_handshake_undetermined(h2o_socket_t *sock)
flush_pending_ssl(sock, cb);
}
ptls_buffer_dispose(wbuf);
-#if PTLS_OPENSSL_HAVE_ASYNC
- sock->ssl->async.undetermined.ptls = NULL;
-#endif
}
static void proceed_handshake(h2o_socket_t *sock, const char *err)
|
Disable some tests for now. | @@ -24,8 +24,8 @@ build_script:
test_script:
- .\vcnet\x64\Release\ippfind.exe --help
- - .\vcnet\x64\Release\ipptool.exe --help
- - .\vcnet\x64\Release\ippserver.exe --help
+# - .\vcnet\x64\Release\ipptool.exe --help
+# - .\vcnet\x64\Release\ippserver.exe --help
artifacts:
- path: '**\*.exe'
|
Rename parameter to be more consistent. | #include <util/string/cast.h>
namespace {
- constexpr char PROBABILITY_BORDER_PARAM[] = "prob_border";
+ constexpr char PROBABILITY_BORDER_PARAM[] = "probability_border";
}
NCatboostOptions::TDataProcessingOptions::TDataProcessingOptions(ETaskType type)
|
replace 9.12 with 9.13 in build-debian.sh | @@ -4,13 +4,13 @@ source /opt/Xilinx/Vitis/2020.2/settings64.sh
make NAME=led_blinker all
-sudo sh scripts/image.sh scripts/debian.sh red-pitaya-debian-9.12-armhf-$DATE.img 1024
-zip red-pitaya-debian-9.12-armhf-$DATE.zip red-pitaya-debian-9.12-armhf-$DATE.img
+sudo sh scripts/image.sh scripts/debian.sh red-pitaya-debian-9.13-armhf-$DATE.img 1024
+zip red-pitaya-debian-9.13-armhf-$DATE.zip red-pitaya-debian-9.13-armhf-$DATE.img
-sudo sh scripts/image.sh scripts/debian-ecosystem.sh red-pitaya-ecosystem-0.95-debian-9.12-armhf-$DATE.img 1024
-zip red-pitaya-ecosystem-0.95-debian-9.12-armhf-$DATE.zip red-pitaya-ecosystem-0.95-debian-9.12-armhf-$DATE.img
+sudo sh scripts/image.sh scripts/debian-ecosystem.sh red-pitaya-ecosystem-0.95-debian-9.13-armhf-$DATE.img 1024
+zip red-pitaya-ecosystem-0.95-debian-9.13-armhf-$DATE.zip red-pitaya-ecosystem-0.95-debian-9.13-armhf-$DATE.img
make NAME=sdr_transceiver_emb all
-sudo sh scripts/image.sh scripts/debian-gnuradio.sh red-pitaya-gnuradio-debian-9.12-armhf-$DATE.img 2048
-zip red-pitaya-gnuradio-debian-9.12-armhf-$DATE.zip red-pitaya-gnuradio-debian-9.12-armhf-$DATE.img
+sudo sh scripts/image.sh scripts/debian-gnuradio.sh red-pitaya-gnuradio-debian-9.13-armhf-$DATE.img 2048
+zip red-pitaya-gnuradio-debian-9.13-armhf-$DATE.zip red-pitaya-gnuradio-debian-9.13-armhf-$DATE.img
|
Fix memory leak in bc_mcraw
We were using calloc without any free. This makes it use std::vector
Tested-by: Build Bot | @@ -64,30 +64,31 @@ lcb_error_t McRawProvider::refresh() {
void McRawProvider::configure_nodes(const lcb::Hostlist& hl)
{
- lcbvb_SERVER *servers;
lcbvb_CONFIG *newconfig;
- unsigned nsrv = hl.size();
- if (!nsrv) {
+ if (hl.empty()) {
lcb_log(LOGARGS(this, FATAL), "No nodes provided");
return;
}
- servers = reinterpret_cast<lcbvb_SERVER*>(calloc(nsrv, sizeof(*servers)));
- for (size_t ii = 0; ii < nsrv; ii++) {
+ std::vector<lcbvb_SERVER> servers;
+ servers.reserve(hl.size());
+
+ for (size_t ii = 0; ii < hl.size(); ii++) {
const lcb_host_t& curhost = hl[ii];
- lcbvb_SERVER *srv = servers + ii;
+ servers.resize(servers.size() + 1);
+ lcbvb_SERVER& srv = servers.back();
/* just set the memcached port and hostname */
- srv->hostname = (char *)curhost.host;
- srv->svc.data = std::atoi(curhost.port);
+ srv.hostname = (char *)curhost.host;
+ srv.svc.data = std::atoi(curhost.port);
if (parent->settings->sslopts) {
- srv->svc_ssl.data = srv->svc.data;
+ srv.svc_ssl.data = srv.svc.data;
}
}
newconfig = lcbvb_create();
- lcbvb_genconfig_ex(newconfig, "NOBUCKET", "deadbeef", servers, nsrv, 0, 2);
+ lcbvb_genconfig_ex(newconfig, "NOBUCKET", "deadbeef", &servers[0], servers.size(), 0, 2);
lcbvb_make_ketama(newconfig);
newconfig->revid = -1;
|
Fix "WithHeterCoresSetup" in hetero. docs | @@ -40,13 +40,13 @@ The config fragment to add to your system would look something like the followin
val boomTile1 = BoomTileParams(...) // params for boom core 1
val boomTile2 = BoomTileParams(...) // params for boom core 2
val boomTile3 = BoomTileParams(...) // params for boom core 3
- boomTile0 ++ boomTile1 ++ boomTile2 ++ boomTile3
+ Seq(boomTile0, boomTile1, boomTile2, boomTile3)
}
case RocketTilesKey => {
val rocketTile0 = RocketTileParams(...) // params for rocket core 0
val rocketTile1 = RocketTileParams(...) // params for rocket core 1
- rocketTile0 ++ rocketTile1
+ Seq(rocketTile0, rocketTile1)
}
})
|
replace fireboom DUT with firesim in ci | @@ -48,5 +48,5 @@ mapping["rocketchip"]="SUB_PROJECT=rocketchip"
mapping["blockdevrocketchip"]="SUB_PROJECT=example CONFIG=SimBlockDeviceRocketConfig TOP=TopWithBlockDevice"
mapping["hwacha"]="SUB_PROJECT=example CONFIG=HwachaRocketConfig GENERATOR_PACKAGE=hwacha"
mapping["firesim"]="DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB_FireSimRocketChipConfig PLATFORM_CONFIG=BaseF1Config"
-mapping["fireboom"]="DESIGN=FireBoom TARGET_CONFIG=DDR3FRFCFSLLC4MB_FireSimBoomConfig PLATFORM_CONFIG=BaseF1Config"
+mapping["fireboom"]="DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB_FireSimBoomConfig PLATFORM_CONFIG=BaseF1Config"
mapping["firesim-clockdiv"]="DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB3Div_FireSimRocketChipConfig PLATFORM_CONFIG=BaseF1Config"
|
minor fixup in map doc (people -> seconds) | @@ -33,7 +33,7 @@ IPv4 and IPv6 virtual reassembly support the following configuration:
map params reassembly [ip4 | ip6] [lifetime <lifetime-ms>] [pool-size <pool-size>] [buffers <buffers>] [ht-ratio <ht-ratio>]
lifetime:
- The time in milliseconds a reassembly structure is considered valid. The longer, the more reliable is reassembly, but the more likely it is to exhaust the pool of reassembly structures. IPv4 standard suggests a lifetime of 15 seconds. IPv6 specifies a lifetime of 60 people. Those values are not realistic for high-throughput cases.
+ The time in milliseconds a reassembly structure is considered valid. The longer, the more reliable is reassembly, but the more likely it is to exhaust the pool of reassembly structures. IPv4 standard suggests a lifetime of 15 seconds. IPv6 specifies a lifetime of 60 seconds. Those values are not realistic for high-throughput cases.
buffers:
The upper limit of buffers that are allowed to be cached. It can be used to protect against fragmentation attacks which would aim to exhaust the global buffers pool.
|
Fix small error in a comment
Use '||' instead of 'or' for consistency. | @@ -277,7 +277,7 @@ extern "C" {
#if defined(PSA_WANT_ALG_CBC_PKCS7)
#define MBEDTLS_CIPHER_PADDING_PKCS7
#endif /* PSA_WANT_ALG_CBC_PKCS7 */
-#endif /* PSA_WANT_ALG_CBC_NO_PADDING or PSA_WANT_ALG_CBC_PKCS7 */
+#endif /* PSA_WANT_ALG_CBC_NO_PADDING || PSA_WANT_ALG_CBC_PKCS7 */
#else /* MBEDTLS_PSA_CRYPTO_CONFIG */
|
nrf: Update main.c to init relevant board drivers, if enabled.
If the board has these drivers then they will be initialized:
softpwm (implicit ticker)
music module
board specific module | #include "ble_uart.h"
#endif
+#if MICROPY_PY_MACHINE_SOFT_PWM
+#include "ticker.h"
+#include "softpwm.h"
+#endif
+
void do_str(const char *src, mp_parse_input_kind_t input_kind) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, src, strlen(src), 0);
if (lex == NULL) {
@@ -206,6 +211,23 @@ pin_init0();
}
#endif
+#if MICROPY_PY_MACHINE_SOFT_PWM
+ ticker_init0();
+ softpwm_init0();
+#endif
+
+#if MICROPY_PY_MUSIC
+ microbit_music_init0();
+#endif
+#if BOARD_SPECIFIC_MODULES
+ board_modules_init0();
+#endif
+
+#if MICROPY_PY_MACHINE_SOFT_PWM
+ ticker_start();
+ pwm_start();
+#endif
+
for (;;) {
if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) {
if (pyexec_raw_repl() != 0) {
|
run make distcheck with DESTDIR | @@ -27,5 +27,4 @@ jobs:
- name: make check
run: make check
- name: make distcheck
- run: make distcheck
-
\ No newline at end of file
+ run: make distcheck DESTDIR=/tmp/mod_auth_openidc
|
importing new tests to run tests.py | @@ -6,6 +6,7 @@ from ccl_test_distances import *
from ccl_test_growth import *
from ccl_test_core import *
from ccl_test_power import *
+from ccl_test_distances_hiz_curv_mnu import *
# Overall interface functionality tests
from ccl_test_pyccl_interface import *
|
RC3 changelist | +CARTO Mobile SDK 4.3.0RC3
+-------------------
+
+### Changes/fixes:
+
+* Changed shading of building symbolizers in VT renderer. The lighting is now NOT applied to the top of the building. This matches the behavior of Mapnik.
+* Fixed cyclical resource manager referencing, causing memory leaks on Android
+* Fixed potential timing related crashes happening when disconnecting layers from MapRenderer
+* Fixed a deadlock regression in 4.3.0RC2 when bitmap texture cache was released
+* Fixed an issue in layer removal code that could cause removing more layers than intended
+
+
CARTO Mobile SDK 4.3.0RC2
-------------------
|
board/poppy/usb_pd_policy.c: Format with clang-format
BRANCH=none
TEST=none | @@ -48,8 +48,8 @@ static void board_vbus_update_source_current(int port)
* is controlled by GPIO_USB_C0/1_5V_EN. Both of these signals
* can remain outputs.
*/
- gpio_set_level(gpio_3a_en, vbus_rp[port] == TYPEC_RP_3A0 ?
- 1 : 0);
+ gpio_set_level(gpio_3a_en,
+ vbus_rp[port] == TYPEC_RP_3A0 ? 1 : 0);
gpio_set_level(gpio_5v_en, vbus_en[port]);
} else {
/*
@@ -79,8 +79,7 @@ void typec_set_source_current_limit(int port, enum tcpc_rp_value rp)
int pd_set_power_supply_ready(int port)
{
/* Disable charging */
- gpio_set_level(port ? GPIO_USB_C1_CHARGE_L :
- GPIO_USB_C0_CHARGE_L, 1);
+ gpio_set_level(port ? GPIO_USB_C1_CHARGE_L : GPIO_USB_C0_CHARGE_L, 1);
/* Ensure we advertise the proper available current quota */
charge_manager_source_port(port, 1);
@@ -131,15 +130,13 @@ int pd_check_vconn_swap(int port)
return gpio_get_level(GPIO_PMIC_SLP_SUS_L);
}
-__override void pd_execute_data_swap(int port,
- enum pd_data_role data_role)
+__override void pd_execute_data_swap(int port, enum pd_data_role data_role)
{
/* Only port 0 supports device mode. */
if (port != 0)
return;
- gpio_set_level(GPIO_USB2_OTG_ID,
- (data_role == PD_ROLE_UFP) ? 1 : 0);
+ gpio_set_level(GPIO_USB2_OTG_ID, (data_role == PD_ROLE_UFP) ? 1 : 0);
gpio_set_level(GPIO_USB2_OTG_VBUSSENSE,
(data_role == PD_ROLE_UFP) ? 1 : 0);
}
|
[make] update ip address to try to copy to in the 'install' target | @@ -277,7 +277,7 @@ clean: $(EXTRA_CLEANDEPS)
rm -f $(ALLOBJS) $(DEPS) $(GENERATED) $(OUTBIN) $(OUTELF) $(OUTELF).lst $(OUTELF).debug.lst $(OUTELF).sym $(OUTELF).sym.sorted $(OUTELF).size $(OUTELF).hex $(OUTELF).dump
install: all
- scp $(OUTBIN) 192.168.0.4:/tftproot
+ scp $(OUTBIN) 192.168.0.4:/tftpboot
list-arch:
@echo ARCH = ${ARCH}
|
ipsec: fix l2 header handling in ah encrypt
Use proper length for copying l2 layer in ah encrypt code. Previously
code assumed that there is alywas just one ethernet header preceding IP
header, which might not be true always.
Ticket:
Type: fix
Fixes: N/A | @@ -216,12 +216,12 @@ ah_encrypt_inline (vlib_main_t * vm,
/* transport mode save the eth header before it is overwritten */
if (PREDICT_FALSE (!ipsec_sa_is_set_IS_TUNNEL (sa0)))
{
- ethernet_header_t *ieh0 = (ethernet_header_t *)
- ((u8 *) vlib_buffer_get_current (b[0]) -
- sizeof (ethernet_header_t));
- ethernet_header_t *oeh0 =
- (ethernet_header_t *) ((u8 *) ieh0 + (adv - icv_size));
- clib_memcpy_fast (oeh0, ieh0, sizeof (ethernet_header_t));
+ const u32 l2_len = vnet_buffer (b[0])->ip.save_rewrite_length;
+ u8 *l2_hdr_in = (u8 *) vlib_buffer_get_current (b[0]) - l2_len;
+
+ u8 *l2_hdr_out = l2_hdr_in + adv - icv_size;
+
+ clib_memcpy_le32 (l2_hdr_out, l2_hdr_in, l2_len);
}
vlib_buffer_advance (b[0], adv - icv_size);
|
Use memcpy instead of snprintf when copying string | @@ -143,7 +143,7 @@ static bool replaceString(int argCount) {
// Make a copy of the string so we do not modify the original
char *tmp = malloc(stringLen);
char *tmpFree = tmp;
- snprintf(tmp, stringLen, "%s", string);
+ memcpy(tmp, string, stringLen);
while((tmp = strstr(tmp, to_replace)) != NULL) {
count++;
@@ -158,8 +158,6 @@ static bool replaceString(int argCount) {
return true;
}
- // snprintf(tmp, stringLen, "%s", string);
-
int length = strlen(tmp) - count * (len - strlen(replace)) + 1;
char *pos;
char *newStr = malloc(sizeof(char) * length);
@@ -341,7 +339,7 @@ static bool formatString(int argCount) {
else {
ObjString *strObj = AS_STRING(value);
char *str = malloc(strObj->length + 1);
- snprintf(str, strObj->length + 1, "%s", strObj->chars);
+ memcpy(str, strObj->chars, strObj->length + 1);
replace_strings[j] = str;
}
@@ -353,7 +351,7 @@ static bool formatString(int argCount) {
int stringLen = strlen(string) + 1;
char *tmp = malloc(stringLen);
char *tmpFree = tmp;
- snprintf(tmp, stringLen, "%s", string);
+ memcpy(tmp, string, stringLen);
int count = 0;
while((tmp = strstr(tmp, "{}")))
|
OcAppleKernelLib: Apple SMBIOS patch on AppleACPIPlatform as well
Closes acidanthera/bugtracker#410 | @@ -934,12 +934,29 @@ PatchCustomSmbiosGuid (
if (!RETURN_ERROR (Status)) {
Status = PatcherApplyGenericPatch (&Patcher, &mCustomSmbiosGuidPatch);
if (RETURN_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "Failed to apply patch com.apple.driver.AppleSMBIOS - %r\n", Status));
+ DEBUG ((DEBUG_INFO, "Failed to apply SMBIOS patch com.apple.driver.AppleSMBIOS - %r\n", Status));
} else {
- DEBUG ((DEBUG_INFO, "Patch success com.apple.driver.AppleSMBIOS\n"));
+ DEBUG ((DEBUG_INFO, "SMBIOS Patch success com.apple.driver.AppleSMBIOS\n"));
}
} else {
- DEBUG ((DEBUG_INFO, "Failed to find com.apple.driver.AppleSMBIOS - %r\n", Status));
+ DEBUG ((DEBUG_INFO, "Failed to SMBIOS find com.apple.driver.AppleSMBIOS - %r\n", Status));
+ }
+
+ Status = PatcherInitContextFromPrelinked (
+ &Patcher,
+ Context,
+ "com.apple.driver.AppleACPIPlatform"
+ );
+
+ if (!RETURN_ERROR (Status)) {
+ Status = PatcherApplyGenericPatch (&Patcher, &mCustomSmbiosGuidPatch);
+ if (RETURN_ERROR (Status)) {
+ DEBUG ((DEBUG_INFO, "Failed to apply SMBIOS patch com.apple.driver.AppleACPIPlatform - %r\n", Status));
+ } else {
+ DEBUG ((DEBUG_INFO, "Patch success SMBIOS com.apple.driver.AppleACPIPlatform\n"));
+ }
+ } else {
+ DEBUG ((DEBUG_INFO, "Failed to find SMBIOS com.apple.driver.AppleACPIPlatform - %r\n", Status));
}
return Status;
|
Add about msg | @@ -1447,20 +1447,62 @@ enum {
Main_menu_controls,
Main_menu_save,
Main_menu_save_as,
+ Main_menu_about,
};
void push_main_menu() {
Qmenu* qm = qmenu_create(Main_menu_id);
qmenu_add_choice(qm, "Save", Main_menu_save);
- // qmenu_add_choice(qm, "Save As...", Main_menu_save_as);
+ qmenu_add_choice(qm, "Save As...", Main_menu_save_as);
qmenu_add_spacer(qm);
qmenu_add_choice(qm, "Controls...", Main_menu_controls);
+ qmenu_add_choice(qm, "About...", Main_menu_about);
qmenu_add_spacer(qm);
qmenu_add_choice(qm, "Quit", Main_menu_quit);
qmenu_push_to_nav(qm);
qblock_set_title(&qm->qblock, "ORCA");
}
+void push_about_msg() {
+ // clang-format off
+ static char const* logo[] = {
+ "lqqqk|lqqqk|lqqqk|lqqqk",
+ "x x|xqqqu|x |lqqqu",
+ "mqqqj|m j|mqqqj|mqqqj",
+ };
+ static char const* footer =
+ "Live Programming Environment";
+ // clang-format on
+ int cols = (int)strlen(logo[0]);
+ int hpad = 2;
+ int tpad = 2;
+ int bpad = 1;
+ int sep = 1;
+ int rows = (int)ORCA_ARRAY_COUNTOF(logo);
+ int footer_len = (int)strlen(footer);
+ int width = footer_len;
+ if (cols > width)
+ width = cols;
+ width += hpad * 2;
+ int logo_left_pad = (width - cols) / 2;
+ int footer_left_pad = (width - footer_len) / 2;
+ Qmsg* qm = qmsg_push(tpad + rows + sep + 1 + bpad, width);
+ WINDOW* w = qmsg_window(qm);
+ for (int row = 0; row < rows; ++row) {
+ wmove(w, row + tpad, logo_left_pad);
+ wattrset(w, A_BOLD);
+ for (int col = 0; col < cols; ++col) {
+ char c = logo[row][col];
+ chtype ch = c == '|' ? (ACS_VLINE | (chtype)fg_bg(C_black, C_natural) | A_BOLD)
+ : (NCURSES_ACS(c) | A_BOLD);
+ waddch(w, ch);
+ }
+ }
+ wattrset(w, A_DIM);
+ wmove(w, tpad + rows + sep, footer_left_pad);
+ wprintw(w, footer);
+}
+
void push_controls_msg() {
struct Ctrl_item {
char const* input;
@@ -1852,6 +1894,9 @@ int main(int argc, char** argv) {
case Main_menu_controls:
push_controls_msg();
break;
+ case Main_menu_about:
+ push_about_msg();
+ break;
case Main_menu_save: {
try_save_with_msg(&ged_state);
} break;
|
Update FFI example. | -(def ffi/loc "ffitest/so.so")
-(def ffi/source-loc "ffitest/so.c")
+(def ffi/loc "examples/ffi/so.so")
+(def ffi/source-loc "examples/ffi/so.c")
(os/execute ["cc" ffi/source-loc "-shared" "-o" ffi/loc] :px)
(def module (ffi/native ffi/loc))
|
acl-plugin: remove clib_warnings on plugin init | @@ -1903,9 +1903,7 @@ acl_init (vlib_main_t * vm)
am->fa_conn_table_hash_memory_size = ACL_FA_CONN_TABLE_DEFAULT_HASH_MEMORY_SIZE;
am->fa_conn_table_max_entries = ACL_FA_CONN_TABLE_DEFAULT_MAX_ENTRIES;
vlib_thread_main_t *tm = vlib_get_thread_main ();
- // vec_validate(am->per_worker_data, os_get_nthreads()-1);
vec_validate(am->per_worker_data, tm->n_vlib_mains-1);
- clib_warning("ACL_FA_INIT: per-worker len: %d", vec_len(am->per_worker_data));
{
u16 wk;
u8 tt;
@@ -1919,7 +1917,6 @@ acl_init (vlib_main_t * vm)
}
}
}
- clib_warning("ACL_FA_INIT-DONE: per-worker len: %d", vec_len(am->per_worker_data));
am->fa_min_deleted_sessions_per_interval = ACL_FA_DEFAULT_MIN_DELETED_SESSIONS_PER_INTERVAL;
am->fa_max_deleted_sessions_per_interval = ACL_FA_DEFAULT_MAX_DELETED_SESSIONS_PER_INTERVAL;
|
publish: ignore edit updates if they originated with us | =/ old-note (~(get by notes.u.book) note.del)
?~ old-note
[~ sty]
+ ?: =(our.bol author.u.old-note)
+ [~ sty]
=/ new-note=note
%= data.del
date-created date-created.u.old-note
=/ note (~(get by notes.u.book) note.del)
?~ note
[~ sty]
+ =/ old-comment (~(get by comments.u.note) comment-date.del)
+ ?~ old-comment
+ [~ sty]
+ ?: =(our.bol author.u.old-comment)
+ [~ sty]
=. comments.u.note (~(put by comments.u.note) comment-date.del data.del)
=. notes.u.book (~(put by notes.u.book) note.del u.note)
(emit-updates-and-state host.del book.del u.book del sty)
|
baseboard: octopus: Guard sensor configurations with variant
The octopus baseboard should only declare the sensor CONFIG_ values
if we didn't define the NO_SENSORS variant
BRANCH=None
TEST=buildall | #undef CONFIG_MOTION_SENSE_RESUME_DELAY_US
#define CONFIG_MOTION_SENSE_RESUME_DELAY_US (10 * MSEC)
+#ifndef VARIANT_OCTOPUS_NO_SENSORS
/*
* Interrupt and fifo are only used for base accelerometer
* and the lid sensor is polled real-time (in forced mode).
#define CONFIG_ACCEL_FIFO 256
/* Depends on how fast the AP boots and typical ODRs */
#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3)
+#endif /* VARIANT_OCTOPUS_NO_SENSORS */
/*
* Sensor stack in EC/Kernel depends on a hardware interrupt pin from EC->AP, so
|
Character Icon => OnlineStatus | @@ -56,7 +56,7 @@ namespace FFXIVClientStructs.FFXIV.Client.Game.Character
[FieldOffset(0x19B4)] public ushort CurrentWorld;
[FieldOffset(0x19B6)] public ushort HomeWorld;
- [FieldOffset(0x19C2)] public byte Icon;
+ [FieldOffset(0x19C2)] public byte OnlineStatus;
[FieldOffset(0x19D9)] public byte ShieldValue;
[FieldOffset(0x19DF)] public byte StatusFlags;
[FieldOffset(0x19A8)] public uint CompanionOwnerID;
|
Fixed element-type for AGEN operands | @@ -960,6 +960,7 @@ static void ZydisSetOperandSizeAndElementInfo(ZydisDecoderContext* context,
{
ZYDIS_ASSERT(definition->size[context->eoszIndex] == 0);
operand->size = info->addressWidth;
+ operand->elementType = ZYDIS_ELEMENT_TYPE_INT;
operand->elementCount = 1;
} else
{
|
codegen: update tutorial | @@ -62,13 +62,14 @@ everything just the way you want to, take a look at the man-pages [`kdb-gen(1)`]
To get started the basic invocation of the code-generator should be enough:
```sh
-kdb gen -F ni=spec.ini highlevel "/sw/example/myapp/#0/current" conf
+kdb gen -F ni=spec.ini highlevel "spec/sw/example/myapp/#0/current" conf
```
-This tells the code-generator that your application uses the parent key `/sw/example/myapp/#0/current` and that the output files should be
-called `conf.*`. The argument `highlevel` just specifies which template to use and the option `-F ni=spec.ini` indicates that the
-file `spec.ini` (in the `ni` plugin's format) contains the specification. While the code-generator can read a specification from the KDB,
-we recommend you use the `-F` option. It keeps the KDB clean and can avoid troubles later on, when installing your application.
+This tells the code-generator that your application uses the parent key `/sw/example/myapp/#0/current` (the `spec` namespace prefix is
+needed for technical reasons) and that the output files should be called `conf.*`. The argument `highlevel` just specifies which template to
+use and the option `-F ni=spec.ini` indicates that the file `spec.ini` (in the `ni` plugin's format) contains the specification. While the
+code-generator can read a specification from the KDB, we recommend you use the `-F` option. It keeps the KDB clean and can avoid troubles
+later on, when installing your application.
## Using the generated code
|
dpdk: remove unused defines
Type: refactor | #define DPDK_NB_RX_DESC_VIRTIO 256
#define DPDK_NB_TX_DESC_VIRTIO 256
-#define I40E_DEV_ID_SFP_XL710 0x1572
-#define I40E_DEV_ID_QSFP_A 0x1583
-#define I40E_DEV_ID_QSFP_B 0x1584
-#define I40E_DEV_ID_QSFP_C 0x1585
-#define I40E_DEV_ID_10G_BASE_T 0x1586
-#define I40E_DEV_ID_VF 0x154C
-
/* These args appear by themselves */
#define foreach_eal_double_hyphen_predicate_arg \
_(no-shconf) \
|
framework/media: Fix a bug in StreamHandler
mStreamBuffer should be reset in createWorker.
found this bug. | @@ -95,7 +95,7 @@ void StreamHandler::createWorker()
medvdbg("StreamHandler::createWorker()\n");
if (mStreamBuffer && !mIsWorkerAlive) {
resetWorker();
- mStreamBuffer = nullptr;
+ mStreamBuffer->reset();
mIsWorkerAlive = true;
pthread_attr_t attr;
|
Elektra: Core: KeySet: update OPMPHM lookup | @@ -2004,7 +2004,7 @@ static Key * elektraLookupOpmphmSearch (KeySet * ks, Key const * key, option_t o
cursor_t cursor = 0;
cursor = ksGetCursor (ks);
- size_t index = opmphmLookup (ks->opmphm, keyName (key));
+ size_t index = opmphmLookup (ks->opmphm, ks->size, keyName (key));
if (index >= ks->size)
{
return 0;
@@ -2048,8 +2048,9 @@ static Key * elektraLookupSearch (KeySet * ks, Key * key, option_t options)
void * v;
} conversation;
-#ifdef ELEKTRA_ENABLE_OPTIMIZATIONS
+ Key * found = 0;
+#ifdef ELEKTRA_ENABLE_OPTIMIZATIONS
// OPMPHM always on
options |= KDB_O_OPMPHM;
@@ -2060,8 +2061,6 @@ static Key * elektraLookupSearch (KeySet * ks, Key * key, option_t options)
options ^= KDB_O_OPMPHM;
}
- Key * found = 0;
-
if (options & KDB_O_OPMPHM)
{
if (!ks->opmphm || !opmphmIsBuild (ks->opmphm))
@@ -2085,14 +2084,8 @@ static Key * elektraLookupSearch (KeySet * ks, Key * key, option_t options)
{
found = elektraLookupBinarySearch (ks, key, options);
}
-
- // OPMPHM needs to be removed due to callback stuff
- if (options & KDB_O_OPMPHM)
- {
- options ^= KDB_O_OPMPHM;
- }
#else
- Key * found = elektraLookupBinarySearch (ks, key, options);
+ found = elektraLookupBinarySearch (ks, key, options);
#endif
Key * ret = found;
|
Remove a TODO from evp_test
Now that the EVP_PKEY KDF bridge is based on provider code a TODO item
can be removed from evp_test. | @@ -2494,9 +2494,7 @@ typedef struct pkey_kdf_data_st {
*/
static int pkey_kdf_test_init(EVP_TEST *t, const char *name)
{
- OPENSSL_CTX *save_libctx = NULL;
PKEY_KDF_DATA *kdata = NULL;
- int kdf_nid = OBJ_sn2nid(name);
if (is_kdf_disabled(name)) {
TEST_info("skipping, '%s' is disabled", name);
@@ -2504,28 +2502,17 @@ static int pkey_kdf_test_init(EVP_TEST *t, const char *name)
return 1;
}
- if (kdf_nid == NID_undef)
- kdf_nid = OBJ_ln2nid(name);
-
if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata))))
return 0;
- /*
- * TODO(3.0): This should be using EVP_PKEY_CTX_new_from_name(),
- * but it does not currently since the PKEY_KDF is using legacy paths.
- * Internally it still uses fetches with the legacy path,
- * So for now we hack in the library context.
- */
- save_libctx = OPENSSL_CTX_set0_default(libctx);
- kdata->ctx = EVP_PKEY_CTX_new_id(kdf_nid, NULL);
+
+ kdata->ctx = EVP_PKEY_CTX_new_from_name(libctx, name, NULL);
if (kdata->ctx == NULL
|| EVP_PKEY_derive_init(kdata->ctx) <= 0)
goto err;
- OPENSSL_CTX_set0_default(save_libctx);
t->data = kdata;
return 1;
err:
- OPENSSL_CTX_set0_default(save_libctx);
EVP_PKEY_CTX_free(kdata->ctx);
OPENSSL_free(kdata);
return 0;
|
dwarf: make dwarf_find_debug_frame public
linux kernel's perf tool depends on this being public.
reported-by: Luke Diamand
blame: ("ALIAS dwarf symbols") | @@ -271,7 +271,7 @@ debug_frame_tab_compare (const void *a, const void *b)
return 0;
}
-HIDDEN int
+int
dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, unw_word_t ip,
unw_word_t segbase, const char* obj_name,
unw_word_t start, unw_word_t end)
|
sysdeps/linux: implement sys_mkdirat | #define NR_clock_gettime 228
#define NR_exit_group 231
#define NR_tgkill 234
+#define NR_mkdirat 258
#define NR_newfstatat 262
#define NR_unlinkat 263
#define NR_pselect6 270
@@ -568,8 +569,15 @@ int sys_sigaltstack(const stack_t *ss, stack_t *oss) {
return 0;
}
-int sys_mkdir(const char *path) {
- auto ret = do_syscall(NR_mkdir, path, S_IRWXU | S_IRWXG | S_IRWXO);
+int sys_mkdir(const char *path, mode_t mode) {
+ auto ret = do_syscall(NR_mkdir, path, mode);
+ if (int e = sc_error(ret); e)
+ return e;
+ return 0;
+}
+
+int sys_mkdirat(int dirfd, const char *path, mode_t mode) {
+ auto ret = do_syscall(NR_mkdirat, dirfd, path, mode);
if (int e = sc_error(ret); e)
return e;
return 0;
|
Fix Error: include/graphics/twm4nx/cwindow.hxx:145:35: error: private field 'm_eventObj' is not used [-Werror,-Wunused-private-field] | @@ -142,7 +142,6 @@ namespace Twm4Nx
NXWidgets::CNxString m_name; /**< Name of the window */
FAR NXWidgets::CNxTkWindow *m_nxWin; /**< The contained NX primary window */
FAR CWindowEvent *m_windowEvent; /**< Cached window event reference */
- FAR void *m_eventObj; /**< Object reference that accompanies events */
nxgl_coord_t m_minWidth; /**< The minimum width of the window */
struct SAppEvents m_appEvents; /**< Application event information */
bool m_modal; /**< Window is in modal state */
|
Don't link ClientTelemetry.dll against mincore.lib as it creates issues with unresolved DLL on Windows 7.1A | <Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>uuid.lib;runtimeobject.lib;wininet.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>uuid.lib;runtimeobject.lib;wininet.lib;crypt32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>api-ms-win-core-winrt-l1-1-0.dll;api-ms-win-core-winrt-string-l1-1-0.dll</DelayLoadDLLs>
<LinkStatus>false</LinkStatus>
<CLRUnmanagedCodeCheck>false</CLRUnmanagedCodeCheck>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<ShowProgress>LinkVerboseLib</ShowProgress>
- <IgnoreSpecificDefaultLibraries>user32.lib</IgnoreSpecificDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>user32.lib;Mincore.lib</IgnoreSpecificDefaultLibraries>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<OptimizeReferences>true</OptimizeReferences>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>uuid.lib;runtimeobject.lib;wininet.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>uuid.lib;runtimeobject.lib;wininet.lib;crypt32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>api-ms-win-core-winrt-l1-1-0.dll;api-ms-win-core-winrt-string-l1-1-0.dll</DelayLoadDLLs>
<ForceFileOutput>
<GenerateMapFile>true</GenerateMapFile>
<CLRUnmanagedCodeCheck>false</CLRUnmanagedCodeCheck>
<ShowProgress>LinkVerboseLib</ShowProgress>
- <IgnoreSpecificDefaultLibraries>user32.lib</IgnoreSpecificDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>user32.lib;Mincore.lib</IgnoreSpecificDefaultLibraries>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
Free status tuple when file write fails | @@ -607,6 +607,7 @@ static void file_write_complete_internal(thread t, file f, u64 len,
rv = len;
} else {
rv = sysreturn_from_fs_status_value(s);
+ timm_dealloc(s);
}
apply(completion, t, rv);
}
|
Makefile: Only update doc/build.info when there's an actual change
Fixes | @@ -1096,7 +1096,16 @@ generate_fuzz_oids:
generate_doc_buildinfo:
( $(PERL) -I$(BLDDIR) -Mconfigdata \
$(SRCDIR)/util/dofile.pl -o Makefile \
- $(SRCDIR)/doc/build.info.in > $(SRCDIR)/doc/build.info )
+ $(SRCDIR)/doc/build.info.in \
+ > $(SRCDIR)/doc/build.info.new; \
+ if ( test -e $(SRCDIR)/doc/build.info \
+ && cmp $(SRCDIR)/doc/build.info.new $(SRCDIR)/doc/build.info \
+ > /dev/null ); \
+ then \
+ rm $(SRCDIR)/doc/build.info.new; \
+ else \
+ mv $(SRCDIR)/doc/build.info.new $(SRCDIR)/doc/build.info; \
+ fi )
# Set to -force to force a rebuild
ERROR_REBUILD=
|
travis: install fonts for docs
packges are not availible in trusty, so update travis to xenial
updating to xenial also requires adjusting the pyenv version
[xenial update changes made by | # global options
+dist: xenial
language:
- c
compiler:
@@ -57,13 +58,17 @@ jobs:
# Pybricks ev3dev
- stage: test
env: NAME="Pybricks ev3dev build"
+ before_install:
+ - pyenv versions
+ - sudo apt-get update -qq || true
+ # fonts-roboto-slab was not introduced until bionic
+ - wget -P $HOME http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-roboto-slab/fonts-roboto-slab_1.100263+20170512-1_all.deb
install:
- npm install -g jfrog-cli-go
- - pyenv shell 3.6
+ - pyenv shell 3.6.7
- pip3 install --user Sphinx sphinx_rtd_theme
- - sudo apt update -qq || true
- - sudo apt install qemu-user-static
- - sudo apt install inkscape
+ - sudo dpkg -i $HOME/fonts-roboto-slab_1.100263+20170512-1_all.deb
+ - sudo apt-get install qemu-user-static inkscape fonts-lato
- cd ${HOME}
- git clone --depth=10 --recursive https://github.com/pybricks/micropython
- if [ -n "$TRAVIS_TAG" ]; then
|
Add install rules. Fix | @@ -223,3 +223,9 @@ message("Debug flags: ${CMAKE_C_FLAGS_DEBUG}")
message("Release flags: ${CMAKE_C_FLAGS_RELEASE}")
message("----")
+
+# Install
+
+include(GNUInstallDirs)
+
+install(TARGETS ${OUT_FILE} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
tup: link against egl and glesv3 on android; | @@ -184,6 +184,8 @@ ifeq ($(PLATFORM),android)
LDFLAGS += --target=aarch64-linux-android@(ANDROID_VERSION)
LDFLAGS += -shared
LDFLAGS += -landroid
+ LDFLAGS += -lEGL
+ LDFLAGS += -lGLESv3
LIB = lib/arm64-v8a
PREFIX = $(LIB)/lib
SUFFIX = .so
|
sr_cond BUGFIX ignore EINTR
Refs cesnet/netopeer2#1316 | @@ -64,13 +64,13 @@ sr_cond_destroy(sr_cond_t *cond)
*
* @param[in] uaddr Futex address.
* @param[in] expected Expected value in the futex.
- * @param[in] timeout Timeout for the waiting, infinite if NULL.
+ * @param[in] timeout Absolute timeout for waiting, infinite if NULL.
* @return 0 on success, -1 on error.
*/
static int
sys_futex_wait(uint32_t *uaddr, uint32_t expected, const struct timespec *timeout)
{
- return syscall(SYS_futex, uaddr, FUTEX_WAIT, expected, timeout, NULL, 0);
+ return syscall(SYS_futex, uaddr, FUTEX_WAIT_BITSET, expected, timeout, NULL, FUTEX_BITSET_MATCH_ANY);
}
/**
@@ -171,8 +171,11 @@ sr_cond_wait_(sr_cond_t *cond, pthread_mutex_t *mutex, struct timespec *timeout_
/* MUTEX UNLOCK */
pthread_mutex_unlock(mutex);
- /* wait */
+ /* wait, ignore EINTR */
+ do {
+ errno = 0;
rf = sys_futex_wait(&cond->futex, FUTEX_VAL_IDLE, timeout_ts);
+ } while ((rf == -1) && (errno == EINTR));
/* MUTEX LOCK */
if ((r = sr_cond_mutex_lock(mutex, cond))) {
@@ -207,9 +210,10 @@ sr_cond_wait(sr_cond_t *cond, pthread_mutex_t *mutex)
int
sr_cond_timedwait(sr_cond_t *cond, pthread_mutex_t *mutex, uint32_t timeout_ms)
{
- struct timespec timeout_ts = {0};
+ struct timespec timeout_ts;
- /* get relative timeout */
+ /* get absolute monotonic timeout */
+ clock_gettime(CLOCK_MONOTONIC, &timeout_ts);
timeout_ts = sr_time_ts_add(&timeout_ts, timeout_ms);
return sr_cond_wait_(cond, mutex, &timeout_ts);
|
board/lindar/board.c: Format with clang-format
BRANCH=none
TEST=none | @@ -130,17 +130,13 @@ static struct stprivate_data g_lis2dh_data;
static struct lsm6dsm_data lsm6dsm_data = LSM6DSM_DATA;
/* Matrix to rotate lid and base sensor into standard reference frame */
-static const mat33_fp_t lid_standard_ref = {
- { 0, FLOAT_TO_FP(1), 0},
+static const mat33_fp_t lid_standard_ref = { { 0, FLOAT_TO_FP(1), 0 },
{ FLOAT_TO_FP(1), 0, 0 },
- { 0, 0, FLOAT_TO_FP(-1)}
-};
+ { 0, 0, FLOAT_TO_FP(-1) } };
-static const mat33_fp_t base_standard_ref = {
- { FLOAT_TO_FP(1), 0, 0},
+static const mat33_fp_t base_standard_ref = { { FLOAT_TO_FP(1), 0, 0 },
{ 0, FLOAT_TO_FP(-1), 0 },
- { 0, 0, FLOAT_TO_FP(-1)}
-};
+ { 0, 0, FLOAT_TO_FP(-1) } };
struct motion_sensor_t motion_sensors[] = {
[LID_ACCEL] = {
@@ -425,8 +421,7 @@ static void ps8815_reset(void)
int val;
gpio_set_level(GPIO_USB_C1_RT_RST_ODL, 0);
- msleep(GENERIC_MAX(PS8XXX_RESET_DELAY_MS,
- PS8815_PWR_H_RST_H_DELAY_MS));
+ msleep(GENERIC_MAX(PS8XXX_RESET_DELAY_MS, PS8815_PWR_H_RST_H_DELAY_MS));
gpio_set_level(GPIO_USB_C1_RT_RST_ODL, 1);
msleep(PS8815_FW_INIT_DELAY_MS);
@@ -437,16 +432,16 @@ static void ps8815_reset(void)
CPRINTS("%s: patching ps8815 registers", __func__);
- if (i2c_read8(I2C_PORT_USB_C1,
- PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == EC_SUCCESS)
+ if (i2c_read8(I2C_PORT_USB_C1, PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) ==
+ EC_SUCCESS)
CPRINTS("ps8815: reg 0x0f was %02x", val);
- if (i2c_write8(I2C_PORT_USB_C1,
- PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, 0x31) == EC_SUCCESS)
+ if (i2c_write8(I2C_PORT_USB_C1, PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f,
+ 0x31) == EC_SUCCESS)
CPRINTS("ps8815: reg 0x0f set to 0x31");
- if (i2c_read8(I2C_PORT_USB_C1,
- PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) == EC_SUCCESS)
+ if (i2c_read8(I2C_PORT_USB_C1, PS8XXX_I2C_ADDR1_P2_FLAGS, 0x0f, &val) ==
+ EC_SUCCESS)
CPRINTS("ps8815: reg 0x0f now %02x", val);
}
|
jna: fixed link in news | @@ -157,7 +157,7 @@ you up to date with the multi-language support provided by Elektra.
### Java
- Upgraded maven dependencies for Java binding _(Michael Zronek)_
-- Completely overhauled the Java binding to be able to use Elektra plugins directly. For an example see the [test case](../../src/bindings/jna/libelektra4j/src/test/java/org/libelektra/ErrorNumberTest.java). _(Michael Zronek)_
+- Completely overhauled the Java binding to be able to use Elektra plugins directly. For an example see the [test case](../../src/bindings/jna/libelektra4j/src/test/java/org/libelektra/PluginLoaderIT.java). _(Michael Zronek)_
- The java binding now supports the [error codes](../decisions/error_codes.md) in a native way. All exceptions contain the necessary information. _(Michael Zronek)_
- <<TODO>>
|
lovr.graphics.newMesh accepts Blob again; | @@ -1125,6 +1125,7 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
int dataIndex = 0;
int formatIndex = 0;
int drawModeIndex = 2;
+ Blob* blob = NULL;
if (lua_isnumber(L, 1)) {
count = lua_tointeger(L, 1);
@@ -1139,6 +1140,10 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
formatIndex = 1;
count = lua_objlen(L, 2);
dataIndex = 2;
+ } else if ((blob = luax_totype(L, 2, Blob)) != NULL) {
+ drawModeIndex++;
+ formatIndex = 1;
+ dataIndex = 2;
} else {
count = lua_objlen(L, 1);
dataIndex = 1;
@@ -1186,6 +1191,10 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
}
}
+ if (blob) {
+ count = blob->size / stride;
+ }
+
DrawMode mode = luaL_checkoption(L, drawModeIndex, "fan", DrawModes);
BufferUsage usage = luaL_checkoption(L, drawModeIndex + 1, "dynamic", BufferUsages);
bool readable = lua_toboolean(L, drawModeIndex + 2);
@@ -1213,6 +1222,9 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
if (dataIndex) {
AttributeData data = { .raw = lovrBufferMap(vertexBuffer, 0) };
+ if (blob) {
+ memcpy(data.raw, blob->data, count * stride);
+ } else {
for (uint32_t i = 0; i < count; i++) {
lua_rawgeti(L, dataIndex, i + 1);
lovrAssert(lua_istable(L, -1), "Vertices should be specified as a table of tables");
@@ -1238,6 +1250,7 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
lua_pop(L, 1);
}
}
+ }
lovrBufferMarkRange(vertexBuffer, 0, count * stride);
lovrRelease(vertexBuffer);
|
Pre MN Pool Block creation Fixed | @@ -521,7 +521,18 @@ Value getblocktemplate(const Array& params, bool fHelp)
result.push_back(Pair("bits", HexBits(pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
+
// ---- Masternode info ---
+
+ bool bMasternodePayments = false;
+
+ if(fTestNet){
+ if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS_TESTNET) bMasternodePayments = true;
+ } else {
+ if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS) bMasternodePayments = true;
+ }
+ if(fDebug) { printf("GetBlockTemplate(): Masternode Payments : %i\n", bMasternodePayments); }
+ if(payee != CScript() && bMasternodePayments){
if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, payee)){
//no masternode detected
int winningNode = GetCurrentMasterNode(1);
@@ -540,15 +551,6 @@ Value getblocktemplate(const Array& params, bool fHelp)
}
}
- bool bMasternodePayments = false;
-
- if(fTestNet){
- if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS_TESTNET) bMasternodePayments = true;
- } else {
- if(pindexPrev->nHeight+1 >= BLOCK_START_MASTERNODE_PAYMENTS) bMasternodePayments = true;
- }
- if(fDebug) { printf("GetBlockTemplate(): Masternode Payments : %i\n", bMasternodePayments); }
- if(payee != CScript()){
CTxDestination address1;
ExtractDestination(payee, address1);
CBitcoinAddress address2(address1);
|
FastLinQ QL41000 Series PCI vendor and device ids | @@ -839,6 +839,9 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
{
continue;
}
+ /* Cavium FastlinQ QL41000 Series */
+ else if (d->vendor_id == 0x1077 && d->device_id >= 0x8070 && d->device_id <= 0x8090)
+ ;
else
{
dpdk_log_warn ("Unsupported PCI device 0x%04x:0x%04x found "
|
config-tools: Fix error reporting for memory addresses below 4G
Now, if you use a memory address below 4G, there will be a warning,
but the build process of the hypervisor will not be interrupted. | import os
import sys
-import lib.error
+import logging
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'library'))
import common, math, logging
@@ -104,9 +104,9 @@ def alloc_hpa_region(ram_range_info, mem_info_list, vm_node_index_list):
elif mem_start == hpa_start and mem_end == hpa_end:
del ram_range_info[mem_start]
elif mem_start > hpa_start or mem_end < hpa_end:
- raise lib.error.ResourceError(f"Start address of HPA is out of available memory range: vm id: {vm_index}, hpa_start: {hpa_start}.")
+ logging.warning(f"Start address of HPA is out of available memory range: vm id: {vm_index}, hpa_start: {hpa_start}.")
elif mem_size < hpa_size:
- raise lib.error.ResourceError(f"Size of HPA is out of available memory range: vm id: {vm_index}, hpa_size: {hpa_size}.")
+ logging.warning(f"Size of HPA is out of available memory range: vm id: {vm_index}, hpa_size: {hpa_size}.")
return ram_range_info
|
Fix scope issues with "switch ... case" | @@ -130,34 +130,44 @@ static int dsi_dev_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
switch (cmd)
{
case MIPIDSI_GETDEVLANES:
+ {
FAR uint16_t *planes = (FAR uint16_t *)((uintptr_t)arg);
DEBUGASSERT(planes != NULL);
*planes = priv->dsi_dev->lanes;
+ }
break;
case MIPIDSI_GETDEVFMT:
+ {
FAR uint32_t *fmt = (FAR uint32_t *)((uintptr_t)arg);
DEBUGASSERT(fmt != NULL);
*fmt = priv->dsi_dev->format;
+ }
break;
case MIPIDSI_GETDEVMODE:
+ {
FAR uint32_t *mode = (FAR uint32_t *)((uintptr_t)arg);
DEBUGASSERT(mode != NULL);
*mode = priv->dsi_dev->mode_flags;
+ }
break;
case MIPIDSI_GETDEVHSRATE:
+ {
FAR uint32_t *hsrate = (FAR uint32_t *)((uintptr_t)arg);
DEBUGASSERT(hsrate != NULL);
*hsrate = priv->dsi_dev->hs_rate;
+ }
break;
case MIPIDSI_GETDEVLPRATE:
+ {
FAR uint32_t *lprate = (FAR uint32_t *)((uintptr_t)arg);
DEBUGASSERT(lprate != NULL);
*lprate = priv->dsi_dev->lp_rate;
+ }
break;
default:
ret = -ENOTTY;
|
ble_mesh: stack: Fix PB-GATT not check invalid link flag
For case MESH/NODE/PROV/BI-03-C | @@ -1670,6 +1670,16 @@ int bt_mesh_pb_gatt_recv(struct bt_mesh_conn *conn, struct net_buf_simple *buf)
return -EINVAL;
}
+ /* For case MESH/NODE/PROV/BI-03-C, if the link is closed, when the node receive
+ * a Provisioning PDU , it will send a Provisioning Failed PDU with the Error Code
+ * field set to Unexpected PDU(0x03).
+ */
+ if (bt_mesh_atomic_test_bit(link.flags, LINK_INVALID)) {
+ BT_WARN("Unexpected msg 0x%02x on invalid link", type);
+ prov_send_fail_msg(PROV_ERR_UNEXP_PDU);
+ return -EINVAL;
+ }
+
/* For case MESH/NODE/PROV/BI-15-C, when the node receive a Provisioning PDU
* with the Type field set to the lowest unsupported or RFU value, it sends a
* Provisioning Failed PDU with the Error Code field set to Invalid PDU(0x01).
|
BugID:17646749:[h2][fix] defer ping action if have data in/out | @@ -312,6 +312,7 @@ static void *http2_io(void *user_data)
HAL_MutexLock(handle->mutex);
rv = iotx_http2_exec_io(handle->http2_connect);
HAL_MutexUnlock(handle->mutex);
+ utils_time_countdown_ms(&timer, IOT_HTTP2_KEEP_ALIVE_TIME);
}
if(utils_time_is_expired(&timer) && handle->connect_state) {
HAL_MutexLock(handle->mutex);
|
VERSION bump to version 0.8.48 | @@ -28,7 +28,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 8)
-set(LIBNETCONF2_MICRO_VERSION 47)
+set(LIBNETCONF2_MICRO_VERSION 48)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
accidently deleted an important function | @@ -43,6 +43,12 @@ class URBar(Images):
self.bar_container.paste((255, 255, 255, 255), (s[0]//2 - 1, 0, s[0]//2 + 1, s[1]))
self.timer += time.time() - asdf
+ def add_to_frame_bar(self, background):
+ self.img = self.urbar
+ super().add_to_frame(background, self.x, self.y)
+ self.img = Image.new("RGBA", (4, self.h), (255, 255, 255, 255))
+ super().add_to_frame(background, self.x, self.y)
+
def add_to_frame(self, background):
self.bg = background
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.