message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
File manager can read files upon request | @@ -395,6 +395,47 @@ static void _generate_ui_tree(gui_view_t* container_view, file_view_t* parent_vi
}
}
+static initrd_fs_node_t* _find_node_by_name(char* name) {
+ fs_base_node_t* initrd = array_lookup(root_fs_node->base.children, 0);
+ for (uint32_t i = 0; i < initrd->children->size; i++) {
+ initrd_fs_node_t* child = array_lookup(initrd->children, i);
+ if (!strcmp(child->name, name)) {
+ return child;
+ }
+ }
+ return NULL;
+}
+
+static void _amc_message_received(gui_window_t* window, amc_message_t* msg) {
+ const char* source_service = msg->source;
+
+ uint32_t event = amc_msg_u32_get_word(msg, 0);
+ if (event == FILE_MANAGER_READ_FILE) {
+ file_manager_read_file_request_t* req = (file_manager_read_file_request_t*)&msg->body;
+ initrd_fs_node_t* desired_file = _find_node_by_name(req->path);
+ assert(desired_file, "Failed to find requested file");
+
+ uint32_t response_size = sizeof(file_manager_read_file_response_t) + desired_file->size;
+ uint8_t* response_buffer = calloc(1, response_size);
+
+ file_manager_read_file_response_t* resp = (file_manager_read_file_response_t*)response_buffer;
+ resp->event = FILE_MANAGER_READ_FILE_RESPONSE;
+ resp->file_size = desired_file->size;
+ memcpy(&resp->file_data, desired_file->initrd_offset, resp->file_size);
+ printf("Returning file size 0x%08x buf 0x%08x\n", resp->file_size, resp->file_data);
+ amc_message_construct_and_send(source_service, resp, response_size);
+ free(response_buffer);
+ }
+ else {
+ assert(false, "Unknown message sent to file manager");
+ }
+}
+
+static image_bmp_t* _load_image(const char* name) {
+ initrd_fs_node_t* fs_node = _find_node_by_name(name);
+ return image_parse_bmp(fs_node->size, fs_node->initrd_offset);
+}
+
int main(int argc, char** argv) {
amc_register_service(FILE_MANAGER_SERVICE_NAME);
|
output root normalised | @@ -10,6 +10,7 @@ import {
CMD_STD_OUT,
CMD_STD_ERR
} from "../actions/actionTypes";
+import path from "path";
export default store => next => async action => {
if (action.type === BUILD_GAME) {
@@ -22,7 +23,9 @@ export default store => next => async action => {
const state = store.getState();
const projectRoot = state.document && state.document.root;
const project = state.project.present;
- const outputRoot = remote.app.getPath("temp") + uuid();
+ const outputRoot = path.normalize(
+ remote.app.getPath("temp") + "/" + uuid()
+ );
await buildProject(project, {
projectRoot,
|
Fix warning in overwrite only | @@ -1012,6 +1012,8 @@ boot_copy_image(struct boot_status *bs)
size_t this_size;
size_t last_sector;
+ (void)bs;
+
#if defined(MCUBOOT_OVERWRITE_ONLY_FAST)
uint32_t src_size = 0;
rc = boot_read_image_size(1, boot_img_hdr(&boot_data, 1), &src_size);
|
tcp: modify errno when connect raddr is ANY for ltp | @@ -81,7 +81,7 @@ static int tcp_find_ipv4_device(FAR struct tcp_conn_s *conn,
return OK;
}
- return -EINVAL;
+ return -ECONNREFUSED;
}
/* We need to select the device that is going to route the TCP packet
@@ -137,7 +137,7 @@ static int tcp_find_ipv6_device(FAR struct tcp_conn_s *conn,
return OK;
}
- return -EINVAL;
+ return -ECONNREFUSED;
}
/* We need to select the device that is going to route the TCP packet
|
nx-compress: PR_DEBUG not prerror in the normal case | @@ -70,7 +70,7 @@ static int nx_cfg_dma_vas_mmio(u32 gcid, u64 xcfg)
if (rc)
prerror("NX%d: ERROR: DMA VAS MMIO BAR, %d\n", gcid, rc);
else
- prerror("NX%d: DMA VAS MMIO BAR, 0x%016lx, xcfg 0x%llx\n",
+ prlog(PR_DEBUG, "NX%d: DMA VAS MMIO BAR, 0x%016lx, xcfg 0x%llx\n",
gcid, (unsigned long)cfg, xcfg);
return rc;
|
Sort `rgbgfx`'s `-r` option alphabetically | .Nd Game Boy graphics converter
.Sh SYNOPSIS
.Nm
-.Op Fl r Ar stride
.Op Fl CmuVZ
.Op Fl v Op Fl v No ...
.Op Fl a Ar attrmap | Fl A
.Op Fl o Ar out_file
.Op Fl p Ar pal_file | Fl P
.Op Fl q Ar pal_map | Fl Q
+.Op Fl r Ar stride
.Op Fl s Ar nb_colors
.Op Fl t Ar tilemap | Fl T
.Op Fl x Ar quantity
|
Add OP_LOADSYM16, OP_STRING16 | @@ -483,6 +483,30 @@ static inline int op_loadsym( mrbc_vm *vm, mrbc_value *regs )
}
+//================================================================
+/*! OP_LOADSYM16
+
+ R(a) = Syms(b)
+
+ @param vm pointer of VM.
+ @param regs pointer to regs
+ @retval 0 No error.
+*/
+static inline int op_loadsym16( mrbc_vm *vm, mrbc_value *regs )
+{
+ FETCH_BS();
+
+ const char *sym_name = mrbc_get_irep_symbol(vm, b);
+ mrbc_sym sym_id = str_to_symid(sym_name);
+
+ mrbc_decref(®s[a]);
+ regs[a].tt = MRBC_TT_SYMBOL;
+ regs[a].i = sym_id;
+
+ return 0;
+}
+
+
//================================================================
/*! OP_LOADNIL
@@ -2144,6 +2168,38 @@ static inline int op_string( mrbc_vm *vm, mrbc_value *regs )
}
+//================================================================
+/*! OP_STRING16
+
+ R(a) = str_dup(Lit(b))
+
+ @param vm pointer of VM.
+ @param regs pointer to regs
+ @retval 0 No error.
+*/
+static inline int op_string16( mrbc_vm *vm, mrbc_value *regs )
+{
+ FETCH_BB();
+
+#if MRBC_USE_STRING
+ mrbc_object *pool_obj = vm->pc_irep->pools[b];
+
+ /* CAUTION: pool_obj->str - 2. see IREP POOL structure. */
+ int len = bin_to_uint16(pool_obj->str - 2);
+ mrbc_value value = mrbc_string_new(vm, pool_obj->str, len);
+ if( value.string == NULL ) return -1; // ENOMEM
+
+ mrbc_decref(®s[a]);
+ regs[a] = value;
+
+#else
+ not_supported();
+#endif
+
+ return 0;
+}
+
+
//================================================================
/*! OP_STRCAT
@@ -2717,7 +2773,7 @@ int mrbc_vm_run( struct VM *vm )
case OP_LOADI16: ret = op_loadi16 (vm, regs); break;
case OP_LOADI32: ret = op_loadi32 (vm, regs); break;
case OP_LOADSYM: ret = op_loadsym (vm, regs); break;
- //case OP_LOADSYM16: ret = op_loadsym16 (vm, regs); break;
+ case OP_LOADSYM16: ret = op_loadsym16 (vm, regs); break;
case OP_LOADNIL: ret = op_loadnil (vm, regs); break;
case OP_LOADSELF: ret = op_loadself (vm, regs); break;
case OP_LOADT: ret = op_loadt (vm, regs); break;
@@ -2781,7 +2837,7 @@ int mrbc_vm_run( struct VM *vm )
case OP_APOST: ret = op_apost (vm, regs); break;
case OP_INTERN: ret = op_intern (vm, regs); break;
case OP_STRING: ret = op_string (vm, regs); break;
- //case OP_STRING16: ret = op_string16 (vm, regs); break;
+ case OP_STRING16: ret = op_string16 (vm, regs); break;
case OP_STRCAT: ret = op_strcat (vm, regs); break;
case OP_HASH: ret = op_hash (vm, regs); break;
case OP_HASHADD: ret = op_dummy_BB (vm, regs); break;
|
Run `openDocument` from widgets with `isShortcut` as `true` | @@ -223,7 +223,7 @@ import SwiftUI
let url = try URL(resolvingBookmarkData: bookmarkData, bookmarkDataIsStale: &isStale)
_ = url.startAccessingSecurityScopedResource()
Python.shared.widgetLink = inputURL.queryParameters?["link"]
- openDocument(at: url, run: true, isShortcut: false)
+ openDocument(at: url, run: true, isShortcut: true)
} catch {
print(error.localizedDescription)
}
|
cleanup tcmu_get_runner_handler
No need to cast from a void pointer. Follow coding style
above it. | @@ -786,7 +786,7 @@ struct tcmur_handler *tcmu_get_runner_handler(struct tcmu_device *dev)
{
struct tcmulib_handler *handler = tcmu_get_dev_handler(dev);
- return (struct tcmur_handler *)handler->hm_private;
+ return handler->hm_private;
}
static inline struct tcmu_cmd_entry *
|
py/objmap: make_new: Support separate __new__ vs __init__ phases. | /*
- * This file is part of the MicroPython project, http://micropython.org/
+ * This file is part of the Pycopy project, https://github.com/pfalcon/pycopy
+ * This file was part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
+ * Copyright (c) 2014-2021 Paul Sokolovsky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -37,6 +39,9 @@ typedef struct _mp_obj_map_t {
} mp_obj_map_t;
STATIC mp_obj_t map_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+ MP_MAKE_NEW_GET_ONLY_FLAGS();
+ (void)only_new;
+
mp_arg_check_num(n_args, n_kw, 2, MP_OBJ_FUN_ARGS_MAX, false);
mp_obj_map_t *o = m_new_obj_var(mp_obj_map_t, mp_obj_t, n_args - 1);
o->base.type = type;
|
Improve cmake for NodeJS. | @@ -64,7 +64,7 @@ set(NODEJS_PATHS
# Find NodeJS include directories
if(MSVC OR CMAKE_BUILD_TYPE EQUAL "Debug")
- set(NODEJS_V8_HEADERS v8.h v8-debug.h v8-profiler.h v8-version.h)
+ set(NODEJS_V8_HEADERS v8.h v8-version.h v8-profiler.h) # v8-debug.h
else()
set(NODEJS_V8_HEADERS v8.h v8-version.h)
endif()
@@ -75,6 +75,7 @@ endif()
set(NODEJS_HEADERS
node.h
+ node_api.h
${NODEJS_V8_HEADERS}
${NODEJS_UV_HEADERS}
)
@@ -88,6 +89,7 @@ set(NODEJS_INCLUDE_SUFFIXES
include/nodejs/src
include/nodejs/deps/v8/include
include/nodejs/deps/uv/include
+ src
)
set(NODEJS_INCLUDE_PATHS
@@ -170,6 +172,7 @@ find_path(NODEJS_INCLUDE_DIR
if(NODEJS_INCLUDE_DIR)
foreach(HEADER IN ITEMS ${NODEJS_HEADERS})
if(NOT EXISTS ${NODEJS_INCLUDE_DIR}/${HEADER})
+ message(WARNING "NodeJS header ${HEADER} not found in ${NODEJS_INCLUDE_DIR}")
set(NODEJS_INCLUDE_DIR FALSE)
break()
endif()
@@ -201,7 +204,13 @@ if(NOT NODEJS_INCLUDE_DIR)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar "xvf" "${NODEJS_DOWNLOAD_FILE}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" OUTPUT_QUIET)
endif()
- set(NODEJS_INCLUDE_DIR ${NODEJS_OUTPUT_PATH}/include/node)
+ # Find NodeJS includes
+ find_path(NODEJS_INCLUDE_DIR
+ NAMES ${NODEJS_HEADERS}
+ PATHS ${NODEJS_OUTPUT_PATH}
+ PATH_SUFFIXES ${NODEJS_INCLUDE_SUFFIXES}
+ DOC "NodeJS JavaScript Runtime Headers"
+ )
endif()
if(NODEJS_INCLUDE_DIR)
|
getrlimit(): add support for address space resource
When the resource argument is set to RLIMIT_AS, getrlimit() returns
the maximum size of the process virtual memory. | @@ -1453,6 +1453,9 @@ sysreturn getrlimit(int resource, struct rlimit *rlim)
rlim->rlim_cur = 65536;
rlim->rlim_max = 65536;
return 0;
+ case RLIMIT_AS:
+ rlim->rlim_cur = rlim->rlim_max = heap_total(¤t->p->virtual->h);
+ return 0;
}
return set_syscall_error(current, EINVAL);
|
Fix buffer allocation | @@ -83,11 +83,14 @@ static JanetTArrayType get_ta_type_by_name(const uint8_t *name) {
-
-
-
static JanetTArrayBuffer *ta_buffer_init(JanetTArrayBuffer *buf, size_t size) {
+ buf->data = NULL;
+ if (size > 0) {
buf->data = (uint8_t *)calloc(size, sizeof(uint8_t));
+ if (buf->data == NULL) {
+ JANET_OUT_OF_MEMORY;
+ }
+ }
buf->size = size;
#ifdef JANET_BIG_ENDIAN
buf->flags = TA_FLAG_BIG_ENDIAN;
|
Add ~| to arvo to try to debug intermittent crash. | ::
++ wink :: deploy
|= {now/@da eny/@ ski/slyd}
- =^ rig worm.vane (~(slym wa worm.vane) vase.vane +<) :: activate vane
+ =^ rig worm.vane
+ ~| [%failed-vane-activation-for lal]
+ (~(slym wa worm.vane) vase.vane +<) :: activate vane
~% %wink +>+> ~
|%
++ slid
++ slur :: call gate on
|= {gat/vase hil/mill}
^- (unit (pair vase worm))
- =^ sam worm.vane (~(slot wa worm.vane) 6 gat)
+ =^ sam worm.vane
+ ~| [%failed-slot-in lal]
+ (~(slot wa worm.vane) 6 gat)
=^ hig worm.vane
+ ~| [%failed-nest-in lal]
?- -.hil
%& (~(nest wa worm.vane) p.sam p.p.hil)
%| (~(nets wa worm.vane) p.sam p.p.hil)
==
?. hig
~
+ ~| [%failed-slym-in lal]
`(~(slym wa worm.vane) gat +>.hil)
::
++ slur-a ~/(%slur-a |=({gat/vase hil/mill} =+(%a (slur gat hil))))
hil/mill
==
^- [(list move) _vane]
+ ~| [%failed-swim lal org pux]
:: ~& [%swim-wyt `@ud`~(wyt in worm.vane)]
=+ ^= pru
?~ pux
|= {lal/@tas vil/vile bud/vase pax/path txt/@ta} ::
=- ?:(?=(%| -.res) ((slog p.res) ~) (some p.res))
^= res %- mule |.
+ ~| [%failed-vint lal]
=+ gen=(rain pax txt)
~& [%vane-parsed `@p`(mug gen)]
=+ pro=(vent lal vil bud [(slym (slap bud gen) bud) *worm])
|- ^- (unit (unit (cask)))
?~ vanes ~
?. =(lal label.i.vanes) $(vanes t.vanes)
+ ~| [%failed-scry ron bed]
%- scry:(wink:(vent lal vil bud vane.i.vanes) now (shax now) ..^$)
[fur ren bed]
::
|= {org/@tas lal/@tas pux/(unit wire) hen/duct hil/mill =vane}
^- [p=(list move) q=_vane]
=+ ven=(vent lal vil bud vane)
+ ~| [%failed-take lal]
=+ win=(wink:ven now (shax now) beck)
(swim:win org pux hen hil)
::
++ kick :: new main loop
|= {lac/? mor/(list muse)}
=| ova/(list ovum)
+ ~| [%failed-kick lac]
|- ^- {p/(list ovum) q=(list [label=@tas =vane])}
?~ mor [(flop ova) vanes]
=^ nyx vanes (jack lac i.mor)
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
:_ t.vanes
:- label.i.vanes
+ ~| [%failed-vane-activation now lal.fav]
vane:(ruck:(vent lal.fav vil bud [vase.vane.i.vanes *worm]) pax.fav txt.fav)
==
::
|
Add SUSE linux support to installer | @@ -48,6 +48,9 @@ if [[ "$unamestr" == 'Linux' ]]; then
elif [ $(which yum) ]; then
sudo yum install -y python-pip python-devel gcc gcc-c++ python-virtualenv glib2-devel
fi
+ elif [ $(which zypper) ]; then
+ sudo zypper install -y python-pip python-devel gcc gcc-c++ python-virtualenv glib2-devel
+ fi
if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
echo "QIRA QEMU appears to run okay"
|
Temporary commit to try fix TidalQ issues. | @@ -2491,8 +2491,10 @@ void LogBodyEqtide(BODY *body,CONTROL *control,OUTPUT *output,SYSTEM *system,UPD
fprintf(fp,"----- EQTIDE PARAMETERS (%s)------\n",body[iBody].cName);
for (iOut=iStart;iOut<OUTENDEQTIDE;iOut++) {
if (output[iOut].iNum > 0) {
+ //if (iOut == 1084) {
printf("%d\n",iOut);
fflush(stdout);
+ //}
WriteLogEntry(body,control,&output[iOut],system,update,fnWrite[iOut],fp,iBody);
}
}
|
Tools: Add option to display the library version | @@ -35,12 +35,13 @@ static int DBL_EQUAL(double d1, double d2, double tolerance)
static void usage(const char* prog)
{
- printf("Usage: %s [-f] [-v] grib_file grib_file ...\n\n", prog);
+ printf("Usage: %s [-f] [-v] [-V] grib_file grib_file ...\n\n", prog);
printf("Check geometry of GRIB fields with a Gaussian Grid.\n");
printf("(The grid is assumed to be GLOBAL)\n\n");
printf("Options:\n");
printf(" -f Do not exit on first error\n");
printf(" -v Verbose\n");
+ printf(" -V Print the ecCodes version\n");
printf("\n");
exit(1);
}
@@ -263,6 +264,12 @@ int main(int argc, char** argv)
}
exit_on_error = 0;
}
+ else if (STR_EQUAL(arg, "-V")) {
+ printf("\necCodes Version ");
+ grib_print_api_version(stdout);
+ printf("\n\n");
+ return 0;
+ }
else if (STR_EQUAL(arg, "-v")) {
if (argc < 3) {
usage(argv[0]);
|
Added warning if bad lightdata gets through | @@ -21,8 +21,13 @@ void handle_lightcap(SurviveObject *so, LightcapElement *le) {
if (so->channel_map) {
assert(le->sensor_id < 32);
- le->sensor_id = so->channel_map[le->sensor_id];
- assert(le->sensor_id != -1);
+ int ole = le->sensor_id;
+ le->sensor_id = so->channel_map[ole];
+ if (le->sensor_id >= so->sensor_ct) {
+ SurviveContext* ctx = so->ctx;
+ SV_WARN("Invalid sensor %d detected hit (%d)", le->sensor_id, ole);
+ return;
+ }
}
so->ctx->lightcapfunction(so, le);
}
|
I updated the parallel host profile for trinity to use sbatch/srun. | <Field name="parallel" type="bool">false</Field>
</Object>
<Object name="LaunchProfile">
- <Field name="profileName" type="string">parallel viz</Field>
+ <Field name="profileName" type="string">parallel batch standard viz</Field>
<Field name="timeout" type="int">480</Field>
<Field name="numProcessors" type="int">128</Field>
<Field name="numNodesSet" type="bool">true</Field>
<Field name="numNodes" type="int">4</Field>
- <Field name="partitionSet" type="bool">false</Field>
- <Field name="partition" type="string"></Field>
+ <Field name="partitionSet" type="bool">true</Field>
+ <Field name="partition" type="string">standard</Field>
<Field name="bankSet" type="bool">false</Field>
<Field name="bank" type="string"></Field>
<Field name="timeLimitSet" type="bool">true</Field>
<Field name="timeLimit" type="string">4:00:00</Field>
<Field name="launchMethodSet" type="bool">true</Field>
<Field name="launchMethod" type="string">sbatch/srun</Field>
+ <Field name="launchArgsSet" type="bool">true</Field>
+ <Field name="launchArgs" type="string">--qos=viz</Field>
<Field name="forceStatic" type="bool">true</Field>
<Field name="forceDynamic" type="bool">false</Field>
<Field name="active" type="bool">true</Field>
|
Removed the prefix in ImGuiMouseButton enum | @@ -2173,10 +2173,10 @@ namespace sol_ImGui
#ifdef SOL_IMGUI_ENABLE_INPUT_FUNCTIONS
#pragma region MouseButton
lua.new_enum("ImGuiMouseButton",
- "ImGuiMouseButton_Left" , ImGuiMouseButton_Left,
- "ImGuiMouseButton_Right" , ImGuiMouseButton_Right,
- "ImGuiMouseButton_Middle" , ImGuiMouseButton_Middle,
- "ImGuiMouseButton_COUNT" , ImGuiMouseButton_COUNT
+ "Left" , ImGuiMouseButton_Left,
+ "Right" , ImGuiMouseButton_Right,
+ "Middle" , ImGuiMouseButton_Middle,
+ "COUNT" , ImGuiMouseButton_COUNT
);
#pragma endregion MouseButton
|
include/driver/accel_bma2x2.h: Format with clang-format
BRANCH=none
TEST=none | /* Do not use BW lower than 7813, because __fls cannot be call for 0 */
#define BMA2x2_BW_TO_REG(_bw) \
- ((_bw) < 125000 ? \
- BMA2x2_BW_7_81HZ + __fls(((_bw) * 10) / 78125) : \
+ ((_bw) < 125000 ? BMA2x2_BW_7_81HZ + __fls(((_bw)*10) / 78125) : \
BMA2x2_BW_125HZ + __fls((_bw) / 125000))
#define BMA2x2_REG_TO_BW(_reg) \
|
Updates USAGE-GUIDE for s2n_connection_client_cert_used API | @@ -1287,12 +1287,12 @@ ssize_t s2n_client_hello_get_extension_by_id(struct s2n_client_hello *ch, s2n_tl
**s2n_client_hello_get_extension_length** returns the number of bytes the given extension type takes on the ClientHello message received by the server; it can be used to allocate the **out** buffer.
**s2n_client_hello_get_extension_by_id** copies into the **out** buffer **max_length** bytes of a given extension type on the ClienthHello and returns the number of bytes that were copied.
-### s2n\_connection\_is\_client\_authenticated
+### s2n\_connection\_client\_cert\_used
```c
-int s2n_connection_is_client_authenticated(struct s2n_connection *conn);
+int s2n_connection_client_cert_used(struct s2n_connection *conn);
```
-**s2n_connection_is_client_authenticated** returns 1 if the handshake completed and Client Auth was
+**s2n_connection_client_cert_used** returns 1 if the handshake completed and Client Auth was
negotiated during the handshake.
### s2n\_get\_application\_protocol
|
Fix Error: chip/stm32_spi.c:571:23: error: unused function 'spi_getreg8'
and unused function 'spi_putreg8' | @@ -553,27 +553,6 @@ static inline void spi_rx_mode(struct stm32_spidev_s *priv, bool enable)
}
}
-/****************************************************************************
- * Name: spi_getreg8
- *
- * Description:
- * Get the contents of the SPI register at offset
- *
- * Input Parameters:
- * priv - private SPI device structure
- * offset - offset to the register of interest
- *
- * Returned Value:
- * The contents of the 8-bit register
- *
- ****************************************************************************/
-
-static inline uint8_t spi_getreg8(struct stm32_spidev_s *priv,
- uint8_t offset)
-{
- return getreg8(priv->spibase + offset);
-}
-
/****************************************************************************
* Name: spi_putreg8
*
@@ -587,11 +566,13 @@ static inline uint8_t spi_getreg8(struct stm32_spidev_s *priv,
*
****************************************************************************/
+#ifdef HAVE_IP_SPI_V2
static inline void spi_putreg8(struct stm32_spidev_s *priv,
uint8_t offset, uint8_t value)
{
putreg8(value, priv->spibase + offset);
}
+#endif
/****************************************************************************
* Name: spi_readword
|
run_tw_test: test errno after recvfromttl() fail
Only check the value of errno if recvfromttl() did not return the
expected payload length. This prevents exiting when there is no
actual failure. | @@ -3465,7 +3465,7 @@ RECEIVE:
ep->payload,resp_len_payload,lsaddr,lsaddrlen,
(struct sockaddr*)&peer_addr,&peer_addr_len,
&twdatarec.reflected.ttl);
- if(errno != EINTR){
+ if(resp_len != resp_len_payload && errno != EINTR){
OWPError(ep->cntrl->ctx,OWPErrFATAL,
OWPErrUNKNOWN,"recvfromttl(): %M");
goto finish_sender;
|
/devices show productid, fix top level attributes for main device | #include <QProcess>
#include "de_web_plugin.h"
#include "de_web_plugin_private.h"
+#include "device_descriptions.h"
#include "json.h"
#include "rest_devices.h"
#include "utils/utils.h"
@@ -208,6 +209,13 @@ int RestDevices::getDevice(const ApiRequest &req, ApiResponse &rsp)
return REQ_READY_SEND;
}
+ const DeviceDescription ddf = plugin->deviceDescriptions->get(device);
+
+ if (ddf.isValid())
+ {
+ rsp.map["productid"] = ddf.product;
+ }
+
QVariantList subDevices;
for (const auto &sub : device->subDevices())
@@ -219,7 +227,8 @@ int RestDevices::getDevice(const ApiRequest &req, ApiResponse &rsp)
auto *item = sub->itemForIndex(i);
Q_ASSERT(item);
- if (item->descriptor().suffix == RStateLastUpdated)
+ if (item->descriptor().suffix == RStateLastUpdated ||
+ item->descriptor().suffix == RAttrId)
{
continue;
}
@@ -236,9 +245,12 @@ int RestDevices::getDevice(const ApiRequest &req, ApiResponse &rsp)
if (item->descriptor().suffix == RAttrLastSeen || item->descriptor().suffix == RAttrLastAnnounced ||
item->descriptor().suffix == RAttrManufacturerName || item->descriptor().suffix == RAttrModelId ||
item->descriptor().suffix == RAttrSwVersion || item->descriptor().suffix == RAttrName)
+ {
+ if (!rsp.map.contains(ls.at(1)))
{
rsp.map[ls.at(1)] = item->toString(); // top level attribute
}
+ }
else if (ls.at(0) == QLatin1String("attr"))
{
map[ls.at(1)] = item->toVariant(); // sub device top level attribute
|
[dpos] fix pre-LIB map: wrong BP ID used | @@ -65,26 +65,26 @@ func (pls *pLibStatus) addConfirmInfo(block *types.Block) {
bi := ci.blockInfo
// Initialize an empty pre-LIB map entry with genesis block info.
- if _, exist := pls.plib[bi.BPID]; !exist {
- pls.updatePreLIB(bi.BPID, pls.genesisInfo)
+ if _, exist := pls.plib[ci.BPID]; !exist {
+ pls.updatePreLIB(ci.BPID, pls.genesisInfo)
}
- logger.Debug().Str("BP", bi.BPID).
+ logger.Debug().Str("BP", ci.BPID).
Str("hash", bi.BlockHash).Uint64("no", bi.BlockNo).
Msg("new confirm info added")
}
func (pls *pLibStatus) updateStatus() *blockInfo {
- if bi := pls.getPreLIB(); bi != nil {
- pls.updatePreLIB(bi.BPID, bi)
+ if bpID, bi := pls.getPreLIB(); bi != nil {
+ pls.updatePreLIB(bpID, bi)
}
return pls.calcLIB()
}
func (pls *pLibStatus) updatePreLIB(bpID string, bi *blockInfo) {
- pls.plib[bi.BPID] = append(pls.plib[bi.BPID], bi)
- logger.Debug().Str("BP", bi.BPID).
+ pls.plib[bpID] = append(pls.plib[bpID], bi)
+ logger.Debug().Str("BP", bpID).
Str("hash", bi.BlockHash).Uint64("no", bi.BlockNo).
Msg("proposed LIB map updated")
}
@@ -128,13 +128,14 @@ func (pls *pLibStatus) rollbackStatusTo(block *types.Block) error {
return nil
}
-func (pls *pLibStatus) getPreLIB() (bi *blockInfo) {
+func (pls *pLibStatus) getPreLIB() (bpID string, bi *blockInfo) {
var (
prev *list.Element
toUndo = false
e = pls.confirms.Back()
cr = cInfo(e).ConfirmRange
)
+ bpID = cInfo(e).BPID
for e != nil && cr > 0 {
prev = e.Prev()
@@ -360,11 +361,13 @@ func (pls *pLibStatus) calcLIB() *blockInfo {
type confirmInfo struct {
*blockInfo
+ BPID string
confirmsLeft uint16
}
func newConfirmInfo(block *types.Block, confirmsRequired uint16) *confirmInfo {
return &confirmInfo{
+ BPID: block.BPID2Str(),
blockInfo: newBlockInfo(block),
confirmsLeft: confirmsRequired,
}
@@ -375,7 +378,7 @@ func (c confirmInfo) min() uint64 {
}
type blockInfo struct {
- BPID string
+ //BPID string
BlockHash string
BlockNo uint64
ConfirmRange uint64
@@ -383,7 +386,6 @@ type blockInfo struct {
func newBlockInfo(block *types.Block) *blockInfo {
return &blockInfo{
- BPID: block.BPID2Str(),
BlockHash: block.ID(),
BlockNo: block.BlockNo(),
ConfirmRange: block.GetHeader().GetConfirms(),
|
[fix] enhance strength about cpp testcase. | @@ -31,6 +31,14 @@ static void test_thread(void)
uassert_false(1);
}
+ std::thread t2(func);
+ t2.join();
+
+ if (count != 200)
+ {
+ uassert_false(1);
+ }
+
uassert_true(1);
}
|
Ensure configured module specific and application specific defines are used | @@ -231,8 +231,8 @@ LIB_CPPFLAGS={- our $lib_cppflags =
join(' ', $target{lib_cppflags} || (),
$target{shared_cppflag} || (),
(map { '-D'.$_ }
- @{$config{lib_defines}},
- @{$config{shared_defines}}),
+ @{$config{lib_defines} || ()},
+ @{$config{shared_defines} || ()}),
@{$config{lib_cppflags}},
@{$config{shared_cppflag}});
join(' ', $lib_cppflags,
@@ -256,6 +256,9 @@ LIB_LDFLAGS={- join(' ', $target{shared_ldflag} || (),
LIB_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
DSO_CPPFLAGS={- join(' ', $target{dso_cppflags} || (),
$target{module_cppflags} || (),
+ (map { '-D'.$_ }
+ @{$config{dso_defines} || ()},
+ @{$config{module_defines} || ()}),
@{$config{dso_cppflags}},
@{$config{module_cppflags}},
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
@@ -276,6 +279,7 @@ DSO_LDFLAGS={- join(' ', $target{dso_ldflags} || (),
'$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
BIN_CPPFLAGS={- join(' ', $target{bin_cppflags} || (),
+ (map { '-D'.$_ } @{$config{bin_defines} || ()}),
@{$config{bin_cppflags}},
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
BIN_CFLAGS={- join(' ', $target{bin_cflags} || (),
|
SOVERSION bump to version 4.1.14 | @@ -38,7 +38,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 4)
set(SYSREPO_MINOR_SOVERSION 1)
-set(SYSREPO_MICRO_SOVERSION 13)
+set(SYSREPO_MICRO_SOVERSION 14)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
Improve comment, remove duplicated header and extraneous braces. | @@ -14,7 +14,6 @@ Archive Get File
#include "info/infoArchive.h"
#include "postgres/interface.h"
#include "storage/helper.h"
-#include "storage/helper.h"
/***********************************************************************************************************************************
Check if a WAL file exists in the repository
@@ -157,11 +156,9 @@ archiveGetFile(
cipherBlockNew(cipherModeDecrypt, cipherType, bufNewStr(archiveGetCheckResult.cipherPass), NULL)));
}
- // If file is gzipped then add the decompression filter
+ // If file is compressed then add the decompression filter
if (strEndsWithZ(archiveGetCheckResult.archiveFileActual, "." GZIP_EXT))
- {
ioFilterGroupAdd(filterGroup, gzipDecompressFilter(gzipDecompressNew(false)));
- }
ioWriteFilterGroupSet(storageFileWriteIo(destination), filterGroup);
|
Fix year on 2.09 release.
Reported by Achilleas Mantzios. | </release-core-list>
</release>
- <release date="2018-01-30" version="2.09" title="Minor Improvements and Bug Fixes">
+ <release date="2019-01-30" version="2.09" title="Minor Improvements and Bug Fixes">
<release-core-list>
<release-bug-list>
<release-item>
|
fix tabbed titlebar widths | @@ -599,7 +599,8 @@ static void render_container_tabbed(struct sway_output *output,
struct border_colors *current_colors = &config->border_colors.unfocused;
struct sway_container_state *pstate = &con->current;
- int tab_width = pstate->swayc_width / pstate->children->length;
+ double width_gap_adjustment = 2 * pstate->current_gaps;
+ int tab_width = (pstate->swayc_width - width_gap_adjustment) / pstate->children->length;
// Render tabs
for (int i = 0; i < pstate->children->length; ++i) {
@@ -628,7 +629,7 @@ static void render_container_tabbed(struct sway_output *output,
// Make last tab use the remaining width of the parent
if (i == pstate->children->length - 1) {
- tab_width = pstate->swayc_width - tab_width * i;
+ tab_width = (pstate->swayc_width - width_gap_adjustment) - tab_width * i;
}
render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width,
|
doc: update 'asa.rst' for 2.7 release
Update security advisory 2.7 release. | Security Advisory
#################
+Addressed in ACRN v2.7
+************************
+
+We recommend that all developers upgrade to this v2.7 release (or later), which
+addresses the following security issue discovered in previous releases:
+
+-----
+
+- Heap-use-after-free happens in ``MEVENT mevent_handle``
+ The file descriptor of ``mevent`` could be closed in another thread while being
+ monitored by ``epoll_wait``. This causes a heap-use-after-free error in
+ the ``mevent_handle()`` function.
+
+ **Affected Release:** v2.6 and earlier
+
Addressed in ACRN v2.6
************************
|
DoxyGen: Update used compilers for RTX5 development. | @@ -1565,9 +1565,9 @@ RTX5 is initially developed and optimized using Arm Compiler and Arm/Keil MDK.
The current release is tested with the following versions:
<ul>
<li>Arm Compiler 5.06 Update 6</li>
- <li>Arm Compiler 6.6.2 (Long Term Maintenance)</li>
- <li>Arm Compiler 6.9</li>
- <li>RTOS-aware debugging with uVision 5.24</li>
+ <li>Arm Compiler 6.6.4 (Long Term Maintenance)</li>
+ <li>Arm Compiler 6.16</li>
+ <li>RTOS-aware debugging with uVision 5.34</li>
</ul>
|
maximize fix | @@ -2081,7 +2081,7 @@ movemouse(const Arg *arg)
togglefloating(NULL);
createoverlay();
selmon->gesture = 11;
- } else if (selmon->sel->isfloating) {
+ } else if (selmon->sel->isfloating || NULL == selmon->lt[selmon->sellt]->arrange) {
notfloating = 1;
}
} else {
|
QuickTest: add Limesuite version information | #include "Logger.h"
#include "LMS64CProtocol.h"
#include "LimeSDRTest.h"
+#include "VersionInfo.h"
#include <thread>
#include "kiss_fft.h"
#include "FPGA_Mini.h"
@@ -483,6 +484,7 @@ int LimeSDRTest::RunTests(TestCallback cb, bool nonblock)
std::string str = "[ TESTING STARTED ]\n->Start time: ";
std::time_t time = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
str += std::ctime(&time);
+ str += "->LimeSuite version: " + lime::GetLibraryVersion() + "\n";
UpdateStatus(LMS_TEST_INFO, str.c_str());
auto testObj = Connect();
|
sysdeps/qword: Do not fail on sys_anon_free() | @@ -65,7 +65,10 @@ int sys_anon_allocate(size_t size, void **pointer) {
return 0;
}
-int sys_anon_free(void *pointer, size_t size) STUB_ONLY
+int sys_anon_free(void *pointer, size_t size) {
+ mlibc::infoLogger() << "mlibc: " << __func__ << " is a stub!" << frg::endlog;
+ return 0;
+}
#ifndef MLIBC_BUILDING_RTDL
void sys_exit(int status) {
|
[chainmaker][#436]modify url chain_id and org_id pass by python | @@ -13,7 +13,10 @@ DEPENDENCE_LIBS = $(BOAT_LIB_DIR)/libboatwallet.a \
-lm\
-lrt\
-lsubunit
-BOAT_CFLAGS += -DTEST_CHAINMAKER__NODE_URL=\"$(TEST_CHAINMAKER_NODE_URL)\"
+
+BOAT_CFLAGS += -DTEST_CHAINMAKER_NODE_URL=\"$(CHAINMKER_NODE_URL)\"\
+ -DTEST_CHAINMAKER_CHAIN_ID=\"$(CHAINMKER_CHAIN_ID)\"\
+ -DTEST_CHAINMAKER_ORG_ID=\"$(CHAINMKER_ORG_ID)\"
all: $(OBJECTS_DIR) $(OBJECTS)
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) $(OBJECTS) $(DEPENDENCE_LIBS) -o $(EXECUTABLE_DIR)/boattest
|
SOVERSION bump to version 3.2.1 | @@ -67,7 +67,7 @@ set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION
# with backward compatible change and micro version is connected with any internal change of the library.
set(LIBNETCONF2_MAJOR_SOVERSION 3)
set(LIBNETCONF2_MINOR_SOVERSION 2)
-set(LIBNETCONF2_MICRO_SOVERSION 0)
+set(LIBNETCONF2_MICRO_SOVERSION 1)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
|
turn off buffering to standard output | @@ -79,6 +79,11 @@ int main(int argc, char *argv[])
size_t i;
int err;
+ /*
+ * turn off buffering on stdout
+ */
+ setbuf(stdout, NULL);
+
(void)re_fprintf(stdout, "baresip v%s"
" Copyright (C) 2010 - 2018"
" Alfred E. Heggestad et al.\n",
|
libbpf-tools: update readahead for libbpf 1.0
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly. | @@ -110,14 +110,9 @@ int main(int argc, char **argv)
if (err)
return err;
+ libbpf_set_strict_mode(LIBBPF_STRICT_ALL);
libbpf_set_print(libbpf_print_fn);
- err = bump_memlock_rlimit();
- if (err) {
- fprintf(stderr, "failed to increase rlimit: %d\n", err);
- return 1;
- }
-
obj = readahead_bpf__open();
if (!obj) {
fprintf(stderr, "failed to open BPF object\n");
|
Check if /tmp/urbit.sock already exists | +#include <unistd.h>
#include <uv.h>
#include "all.h"
#include "vere/vere.h"
@@ -416,6 +417,10 @@ u3_king_commence()
}
/* listen on command socket */
+ if ( access("/tmp/urbit.sock", F_OK) != -1 ) {
+ fprintf(stderr, "/tmp/urbit.sock exists - is urbit already running?\r\n");
+ exit(1);
+ }
uv_pipe_init(u3L, &u3K.cmd_u, 0);
uv_pipe_bind(&u3K.cmd_u, "/tmp/urbit.sock");
uv_listen((uv_stream_t *)&u3K.cmd_u, 128, _king_socket_connect);
|
oculus_mobile: respect t.headset.msaa; | @@ -31,12 +31,14 @@ static struct {
static struct {
void (*renderCallback)(void*);
void* renderUserdata;
+ uint32_t msaa;
float offset;
} state;
// Headset driver object
static bool vrapi_init(float offset, uint32_t msaa) {
+ state.msaa = msaa;
state.offset = offset;
return true;
}
@@ -529,7 +531,7 @@ void bridgeLovrDraw(BridgeLovrDrawData *drawData) {
.depth.enabled = true,
.depth.readable = false,
.depth.format = FORMAT_D24S8,
- .msaa = 4,
+ .msaa = state.msaa,
.stereo = true,
.mipmaps = false
});
|
Don't apply hide_edge_borders to any floating container
This fixes the following scenario:
Place a floating window so its border is right at the edge of the
screen
Create a new split
The border disappears
Moving the window does not restore the border | @@ -262,7 +262,7 @@ void view_autoconfigure(struct sway_view *view) {
con->pending.border_left = con->pending.border_right = true;
double y_offset = 0;
- if (!container_is_floating(con) && ws) {
+ if (!container_is_floating_or_child(con) && ws) {
if (config->hide_edge_borders == E_BOTH
|| config->hide_edge_borders == E_VERTICAL) {
con->pending.border_left = con->pending.x != ws->x;
@@ -281,14 +281,15 @@ void view_autoconfigure(struct sway_view *view) {
(config->hide_edge_borders_smart == ESMART_NO_GAPS &&
!gaps_to_edge(view));
if (smart) {
- bool show_border = container_is_floating_or_child(con) ||
- !view_is_only_visible(view);
+ bool show_border = !view_is_only_visible(view);
con->pending.border_left &= show_border;
con->pending.border_right &= show_border;
con->pending.border_top &= show_border;
con->pending.border_bottom &= show_border;
}
+ }
+ if (!container_is_floating(con)) {
// In a tabbed or stacked container, the container's y is the top of the
// title area. We have to offset the surface y by the height of the title,
// bar, and disable any top border because we'll always have the title bar.
|
Resolver: Ignore warning about string truncation | @@ -283,7 +283,14 @@ static void elektraAddErrnoText (char * errorText)
{
strcpy (buffer, strerror (errno));
}
+#if defined(__GNUC__) && __GNUC__ >= 8 && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
strncat (errorText, buffer, ERROR_SIZE - 2 - strlen (errorText));
+#if defined(__GNUC__) && __GNUC__ >= 8 && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
}
static int needsMapping (Key * testKey, Key * errorKey)
|
resolver: disable cache timestamp check and storage if filesystem is missing nanosecond timestamps | @@ -556,7 +556,7 @@ int ELEKTRA_PLUGIN_FUNCTION (get) (Plugin * handle, KeySet * returned, Key * par
name = strcat (name, pk->filename);
ELEKTRA_LOG_DEBUG ("persistent chid key: %s", name);
- if ((global = elektraPluginGetGlobalKeySet (handle)) != NULL)
+ if ((global = elektraPluginGetGlobalKeySet (handle)) != NULL && ELEKTRA_STAT_NANO_SECONDS (buf) != 0)
{
ELEKTRA_LOG_DEBUG ("global-cache: check cache update needed?");
Key * time = ksLookupByName (global, name, KDB_O_NONE);
@@ -586,7 +586,7 @@ int ELEKTRA_PLUGIN_FUNCTION (get) (Plugin * handle, KeySet * returned, Key * par
pk->mtime.tv_nsec = ELEKTRA_STAT_NANO_SECONDS (buf);
/* Persist modification times for cache */
- if (global != NULL)
+ if (global != NULL && ELEKTRA_STAT_NANO_SECONDS (buf) != 0)
{
ELEKTRA_LOG_DEBUG ("global-cache: adding file modufication times");
Key * time = keyNew (name, KEY_BINARY, KEY_SIZE, sizeof (struct timespec), KEY_VALUE, &(pk->mtime), KEY_END);
|
struct epoll_event only packed on x86_64 | @@ -685,10 +685,17 @@ struct tms {
#define CLONE_NEWNET 0x40000000 /* New network namespace */
#define CLONE_IO 0x80000000 /* Clone io context */
+#ifdef __x86_64__
+#define __packed __attribute__((packed))
+#else
+#define __packed
+#endif
+
struct epoll_event {
u32 events; /* Epoll events */
u64 data;
-} __attribute__((packed));
+} __packed;
+#undef __packed
#define EPOLL_CTL_ADD 0x1
#define EPOLL_CTL_DEL 0x2
|
queryweights support in GPU boosting metrics calcer in case of CPU fallback | @@ -98,6 +98,8 @@ namespace NCatboostCuda {
void CacheQueryInfo(const TGpuSamplesGrouping<TTargetMapping>& samplesGrouping) {
if (QueryInfo.size() == 0) {
+ CacheCpuTargetAndWeight();
+
const ui32 qidCount = samplesGrouping.GetQueryCount();
ui32 cursor = 0;
@@ -106,6 +108,7 @@ namespace NCatboostCuda {
TQueryInfo queryInfo;
queryInfo.Begin = cursor;
queryInfo.End = cursor + querySize;
+ queryInfo.Weight = CpuWeights[cursor];
if (samplesGrouping.HasSubgroupIds()) {
const ui32* subgroupIds = samplesGrouping.GetSubgroupIds(qid);
|
Fix tabspace, Add author | @@ -642,19 +642,17 @@ VOID PhTickProcessNodes(
for (i = 0; i < ProcessNodeList->Count; i++)
{
- ULONG remainsValidMask;
PPH_PROCESS_NODE node = ProcessNodeList->Items[i];
// The name and PID never change, so we don't invalidate that.
memset(&node->TextCache[2], 0, sizeof(PH_STRINGREF) * (PHPRTLC_MAXIMUM - 2));
+ node->ValidMask &= PHPN_OSCONTEXT | PHPN_IMAGE | PHPN_DPIAWARENESS | PHPN_APPID | PHPN_DESKTOPINFO | PHPN_USERNAME; // Items that always remain valid
- remainsValidMask = PHPN_OSCONTEXT | PHPN_IMAGE | PHPN_APPID | PHPN_DESKTOPINFO | PHPN_USERNAME; // Items that always remain valid
// The DPI awareness defaults to unaware if not set or declared in the manifest in which case
// it can be changed once, so we can only be sure that it won't be changed again if it is different
- // from Unaware.
+ // from Unaware (poizan42).
if (node->DpiAwareness != 1)
- remainsValidMask |= PHPN_DPIAWARENESS;
- node->ValidMask &= remainsValidMask;
+ node->ValidMask |= PHPN_DPIAWARENESS;
// Invalidate graph buffers.
node->CpuGraphBuffers.Valid = FALSE;
|
Update check_sollve.sh with 11.5-0 expected fails. | @@ -13,7 +13,7 @@ compile_regex='Compiler result": "(.*)"'
runtime_regex='Runtime result": "(.*)"'
#skip known failures for now
-skip_tests='gemv_target.cpp gemv_target_reduction.cpp reduction_separated_directives.cpp test_target_enter_data_classes_inheritance.cpp test_target_enter_exit_data_classes.cpp reduction_separated_directives.c test_target_data_map_array_sections.c test_target_teams_distribute_thread_limit.c declare_target_module.F90 target/test_target_firstprivate.F90 test_target_private.F90 test_target_data_map_to_array_sections.F90 test_target_teams_distribute_defaultmap.F90 test_target_teams_distribute_firstprivate.F90 test_target_teams_distribute_reduction_min.F90'
+skip_tests='test_target_enter_data_classes_inheritance.cpp test_target_enter_exit_data_classes.cpp declare_target_module.F90 test_target_firstprivate.F90 test_target_private.F90 test_target_teams_distribute_firstprivate.F90 test_target_teams_distribute_reduction_min.F90 test_target_teams_distribute_default_firstprivate.F90'
total_fails=0
while read -r line; do
|
ra: remove unnecessary funtion to simplify | @@ -45,18 +45,6 @@ static struct flb_ra_parser *ra_parse_string(struct flb_record_accessor *ra,
return rp;
}
-static struct flb_ra_parser *ra_parse_regex_id(struct flb_record_accessor *ra,
- int c)
-{
- struct flb_ra_parser *rp;
-
- rp = flb_ra_parser_regex_id_create(c);
- if (!rp) {
- return NULL;
- }
- return rp;
-}
-
/* Create a parser context for a key map or function definition */
static struct flb_ra_parser *ra_parse_meta(struct flb_record_accessor *ra,
flb_sds_t buf, int start, int end)
@@ -130,7 +118,7 @@ static int ra_parse_buffer(struct flb_record_accessor *ra, flb_sds_t buf)
if (isdigit(buf[n])) {
/* Add REGEX_ID entry */
c = atoi(buf + n);
- rp = ra_parse_regex_id(ra, c);
+ rp = flb_ra_parser_regex_id_create(c);
if (!rp) {
return -1;
}
|
Version bumped to 0.5 | @@ -2,8 +2,8 @@ cmake_minimum_required (VERSION 2.8)
project (vcf-validator CXX C)
set (vcf-validator_VERSION_MAJOR 0)
-set (vcf-validator_VERSION_MINOR 4)
-set (vcf-validator_VERSION_PATCH 3)
+set (vcf-validator_VERSION_MINOR 5)
+set (vcf-validator_VERSION_PATCH 0)
# no unknown pragmas: ODB compiler uses some pragmas that the regular compiler doesn't need
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-unknown-pragmas")
|
BugID:21737422: Update fatfs include for cameraapp.c & yts include for yts example | */
#include <fcntl.h>
#include <k_api.h>
+
#include "aos/kernel.h"
-#include "fatfs.h"
+#include "aos/vfs.h"
+#include "fatfs/aos_fatfs.h"
+
#include "st7789.h" /* LCD */
#include "gc0329.h" /* camera */
#include "camera_demo.h"
-#include "fatfs.h"
-#include "aos/vfs.h"
#include "ulog/ulog.h"
uint8_t g_sd_valid = 0;
static uint8_t keyB = 0;
|
Docker: Remove temporary data from Alpine image | @@ -25,7 +25,9 @@ RUN cd /tmp \
&& git clone --depth 1 https://github.com/sanssecours/yaep.git \
&& cd yaep \
&& env CXXFLAGS='-fPIC' ./configure \
- && make -C src install
+ && make -C src install \
+ && cd .. \
+ && rm -r yaep
# Create User:Group
# The id is important as jenkins docker agents use the same id that is running
|
Remove old SDL1 clause. | #include <wchar.h>
#endif
-/* This is a hack. SDL by default want you to rename your main statement, and insert it's own first
- It does that to handle some init code. However, libtcod handles that for you. If we did this
- wrappers like libtcod-net would be hosed, since there is no main statement there. */
-/* This hack is no longer needed when using SDL2 */
-#ifndef TCOD_SDL2
-#ifdef TCOD_MACOSX
-#define _SDL_main_h
-#include "SDL/SDL.h"
-#endif
-#endif
-
#include "external/pstdint.h"
#define TCOD_HEXVERSION 0x010603
|
added error message for out of interpolation range for tinker10 | @@ -224,6 +224,16 @@ static double massfunc_f(ccl_cosmology *cosmo, double halomass, double a, double
//this version uses f(nu) parameterization from Eq. 8 in Tinker et al. 2010
// use this for consistency with Tinker et al. 2010 fitting function for halo bias
case ccl_tinker10:
+ if (odelta < 200){
+ *status = CCL_ERROR_HMF_INTERP;
+ strcpy(cosmo->status_message, "ccl_massfunc.c: ccl_massfunc_f(): Tinker 2010 only supported in range of Delta = 200 to Delta = 3200. Calculation continues assuming Delta = 200.\n");
+ odelta = 200;
+ }
+ if (odelta > 3200){
+ * status = CCL_ERROR_HMF_INTERP;
+ strcpy(cosmo->status_message, "ccl_massfunc.c: ccl_massfunc_f(): Tinker 2010 only supported in range of Delta = 200 to Delta = 3200. Calculation continues assuming Delta = 3200.\n");
+ odelta = 3200;
+ }
if (!cosmo->computed_hmfparams){
ccl_cosmology_compute_hmfparams(cosmo, status);
ccl_check_status(cosmo, status);
|
Fix missing "Global" header on variable dropdown in cases when only global variables are available | @@ -101,7 +101,7 @@ export const namedGlobalVariables = (
id: variable,
code: globalVariableCode(variable),
name: globalVariableName(variable, variablesLookup),
- group: "",
+ group: l10n("FIELD_GLOBAL"),
}))
);
};
|
backport use_integers_for_enums in protobuf/json_format.py | @@ -93,7 +93,8 @@ def MessageToJson(message,
including_default_value_fields=False,
preserving_proto_field_name=False,
indent=4,
- sort_keys=False):
+ sort_keys=False,
+ use_integers_for_enums=False):
"""Converts protobuf message to JSON format.
Args:
@@ -108,18 +109,21 @@ def MessageToJson(message,
indent: The JSON object will be pretty-printed with this indent level.
An indent level of 0 or negative will only insert newlines.
sort_keys: If True, then the output will be sorted by field names.
+ use_integers_for_enums: If true, print integers instead of enum names.
Returns:
A string containing the JSON formatted protocol buffer message.
"""
printer = _Printer(including_default_value_fields,
- preserving_proto_field_name)
+ preserving_proto_field_name,
+ use_integers_for_enums)
return printer.ToJsonString(message, indent, sort_keys)
def MessageToDict(message,
including_default_value_fields=False,
- preserving_proto_field_name=False):
+ preserving_proto_field_name=False,
+ use_integers_for_enums=False):
"""Converts protobuf message to a dictionary.
When the dictionary is encoded to JSON, it conforms to proto3 JSON spec.
@@ -133,12 +137,14 @@ def MessageToDict(message,
preserving_proto_field_name: If True, use the original proto field
names as defined in the .proto file. If False, convert the field
names to lowerCamelCase.
+ use_integers_for_enums: If true, print integers instead of enum names.
Returns:
A dict representation of the protocol buffer message.
"""
printer = _Printer(including_default_value_fields,
- preserving_proto_field_name)
+ preserving_proto_field_name,
+ use_integers_for_enums)
# pylint: disable=protected-access
return printer._MessageToJsonObject(message)
@@ -154,9 +160,11 @@ class _Printer(object):
def __init__(self,
including_default_value_fields=False,
- preserving_proto_field_name=False):
+ preserving_proto_field_name=False,
+ use_integers_for_enums=False):
self.including_default_value_fields = including_default_value_fields
self.preserving_proto_field_name = preserving_proto_field_name
+ self.use_integers_for_enums = use_integers_for_enums
def ToJsonString(self, message, indent, sort_keys):
js = self._MessageToJsonObject(message)
@@ -247,6 +255,8 @@ class _Printer(object):
if field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_MESSAGE:
return self._MessageToJsonObject(value)
elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_ENUM:
+ if self.use_integers_for_enums:
+ return value
enum_value = field.enum_type.values_by_number.get(value, None)
if enum_value is not None:
return enum_value.name
|
docs - remove duplicate left nav entry | <topicref href="postGIS.xml" navtitle="Geospatial Analytics" otherprops="pivotal" linking="none">
<topicref href="postgis-upgrade.xml" otherprops="pivotal" linking="none"/>
</topicref>
- <topicref href="text.xml" navtitle="Text Analytics and Search" otherprops="pivotal"
- linking="none"/>
<topicref href="text.xml" navtitle="Text Analytics and Search" otherprops="pivotal"
linking="none"/>
<topicref href="intro.xml" navtitle="Procedural Languages" linking="none">
|
tools/tcpsubnet: reference tcpsubnet in README | @@ -140,6 +140,7 @@ pair of .c and .py files, and some are directories of files.
- tools/[tcpconnlat](tools/tcpconnlat.py): Trace TCP active connection latency (connect()). [Examples](tools/tcpconnlat_example.txt).
- tools/[tcplife](tools/tcplife.py): Trace TCP sessions and summarize lifespan. [Examples](tools/tcplife_example.txt).
- tools/[tcpretrans](tools/tcpretrans.py): Trace TCP retransmits and TLPs. [Examples](tools/tcpretrans_example.txt).
+- tools/[tcpsubnet](tools/tcpsubnet.py): Summarize and aggregate TCP send by subnet. [Examples](tools/tcpsubnet_example.txt).
- tools/[tcptop](tools/tcptop.py): Summarize TCP send/recv throughput by host. Top for TCP. [Examples](tools/tcptop_example.txt).
- tools/[tcptracer](tools/tcptracer.py): Trace TCP established connections (connect(), accept(), close()). [Examples](tools/tcptracer_example.txt).
- tools/[tplist](tools/tplist.py): Display kernel tracepoints or USDT probes and their formats. [Examples](tools/tplist_example.txt).
|
runtimes/singularity: bump to v2.5.0 | Summary: Application and environment virtualization
Name: %{pname}%{PROJ_DELIM}
-Version: 2.4.6
+Version: 2.5.0
Release: 1%{?dist}
# https://spdx.org/licenses/BSD-3-Clause-LBNL.html
License: BSD-3-Clause-LBNL
|
Run tests with CMake Linux build | -# This is a basic workflow to help you get started with Actions
+# Build on Linux with CMake and execute tests
name: CI-cmake building linux
-# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
@@ -13,29 +12,30 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
- # This workflow contains a single job called "check_code_style"
- cmake_linux_secured:
- # The type of runner that the job will run on
+ cmake_linux:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ include:
+ # secure with IPv4
+ - args: "-DOC_IPV4_ENABLED=ON"
+ # insecure with IPv4
+ - args: "-DOC_SECURITY_ENABLED=OFF -DOC_IPV4_ENABLED=ON"
- # Steps represent a sequence of tasks that will be executed as part of the job
steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
+ with:
+ submodules: "true"
-
- # Runs a set of commands using the runners shell
- - name: cmake secured
+ - name: build
run: |
- # https://github.com/actions/checkout/issues/81
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
- git submodule sync --recursive
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- # create the make files in a subfolder
mkdir linuxbuild
cd linuxbuild
- cmake ../.
+ cmake ../. ${{ matrix.args }} -DBUILD_TESTING=ON
make all
+ - name: test
+ run: |
+ cd linuxbuild
+ ctest --verbose
|
tests FEATURE clean all files created by tests | @@ -28,6 +28,12 @@ endif()
# generate config
configure_file("${PROJECT_SOURCE_DIR}/tests/config.h.in" "${PROJECT_BINARY_DIR}/tests/config.h" ESCAPE_QUOTES @ONLY)
+if(${CMAKE_VERSION} VERSION_GREATER "3.7")
+ # tests cleanup fixture
+ add_test(NAME tests_done COMMAND make test_clean)
+ set_tests_properties(tests_done PROPERTIES FIXTURES_CLEANUP tests_cleanup)
+endif()
+
if(ENABLE_TESTS)
# format
if (${SOURCE_FORMAT_ENABLED})
@@ -53,6 +59,9 @@ if(ENABLE_TESTS)
"SYSREPO_REPOSITORY_PATH=${PROJECT_BINARY_DIR}/test_repositories/${test_name}"
"SYSREPO_SHM_PREFIX=_tests_sr_${test_name}"
)
+ if(${CMAKE_VERSION} VERSION_GREATER "3.7")
+ set_tests_properties(${test_name} PROPERTIES FIXTURES_REQUIRED tests_cleanup)
+ endif()
endforeach()
endif()
@@ -69,11 +78,15 @@ endif()
if(ENABLE_VALGRIND_TESTS)
foreach(test_name IN LISTS tests)
add_test(NAME ${test_name}_valgrind COMMAND valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ${CMAKE_BINARY_DIR}/tests/${test_name})
- set_property(TEST ${test_name}_valgrind APPEND PROPERTY ENVIRONMENT
+ set(test_name "${test_name}_valgrind")
+ set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT
"TZ=CET+02:00"
"SYSREPO_REPOSITORY_PATH=${PROJECT_BINARY_DIR}/test_repositories/${test_name}"
"SYSREPO_SHM_PREFIX=_tests_sr_${test_name}"
)
+ if(${CMAKE_VERSION} VERSION_GREATER "3.7")
+ set_tests_properties(${test_name} PROPERTIES FIXTURES_REQUIRED tests_cleanup)
+ endif()
endforeach()
endif()
|
style: Supplementary notes | @@ -142,7 +142,8 @@ extern "C" {
*
* @return
* This function returns BOAT_SUCCESS if initialization is successful.\n
- * Otherwise it returns BOAT_ERROR.
+ * Otherwise it returns one of the error codes. Refer to header file boaterrcode.h
+ * for details.
* @see BoatIotSdkDeInit()
******************************************************************************/
BOAT_RESULT BoatIotSdkInit(void);
@@ -212,7 +213,8 @@ void BoatIotSdkDeInit(void);
*
* @return
* This function returns the non-negative index of the loaded wallet.\n
- * It returns -1 if wallet creation fails.
+ * Otherwise it returns one of the error codes. Refer to header file boaterrcode.h
+ * for details.
*
* @see BoatWalletUnload() BoatWalletDelete()
******************************************************************************/
|
esp32: Fix int overflow in machine.sleep/deepsleep functions. | @@ -89,7 +89,7 @@ STATIC mp_obj_t machine_sleep_helper(wake_type_t wake_type, size_t n_args, const
mp_int_t expiry = args[ARG_sleep_ms].u_int;
if (expiry != 0) {
- esp_sleep_enable_timer_wakeup(expiry * 1000);
+ esp_sleep_enable_timer_wakeup(((uint64_t)expiry) * 1000);
}
if (machine_rtc_config.ext0_pin != -1 && (machine_rtc_config.ext0_wake_types & wake_type)) {
|
BugID:19386281: Fix for compile issue for libcoap on linuxhost | @@ -163,7 +163,11 @@ coap_add_data_blocked_response(coap_resource_t *resource,
unsigned char buf[4];
coap_block_t block2 = { 0, 0, 0 };
int block2_requested = 0;
- coap_subscription_t *subscription = coap_find_observer(resource, session, token);
+ coap_subscription_t *subscription = NULL;
+
+#ifndef WITHOUT_OBSERVE
+ subscription = coap_find_observer(resource, session, token);
+#endif
/*
* Need to check that a valid block is getting asked for so that the
|
add test timeout on windows pipeline | @@ -38,7 +38,7 @@ jobs:
configuration: '$(MSBuildConfiguration)'
- script: |
cd $(BuildType)
- ctest --verbose
+ ctest --verbose --timeout 120
displayName: CTest
# - upload: $(Build.SourcesDirectory)/$(BuildType)
# artifact: mimalloc-windows-$(BuildType)
|
Build: Attempt to fix DuetPkg compilation
closes acidanthera/bugtracker#915 | #!/bin/bash
imgbuild() {
+ echo "Erasing older files..."
+ rm -f "${BUILD_DIR}/FV/DUETEFIMAINFV${TARGETARCH}.z" \
+ "${BUILD_DIR}/FV/DxeMain${TARGETARCH}.z" \
+ "${BUILD_DIR}/FV/DxeIpl${TARGETARCH}.z" \
+ "${BUILD_DIR_ARCH}/EfiLoaderRebased.efi" \
+ "${BUILD_DIR}/FV/Efildr${TARGETARCH}" \
+ "${BUILD_DIR}/FV/Efildr${TARGETARCH}Pure" \
+ "${BUILD_DIR}/FV/Efildr${TARGETARCH}Out" \
+ "${BUILD_DIR_ARCH}/boot"
+
echo "Compressing DUETEFIMainFv.FV..."
LzmaCompress -e -o "${BUILD_DIR}/FV/DUETEFIMAINFV${TARGETARCH}.z" \
"${BUILD_DIR}/FV/DUETEFIMAINFV${TARGETARCH}.Fv" || exit 1
|
Add alternate runas method (experimental) | @@ -1199,18 +1199,97 @@ INT_PTR CALLBACK PhpRunAsDlgProc(
}
else
{
- status = PhExecuteRunAsCommand3(
- hwndDlg,
+ HANDLE processHandle = NULL;
+ HANDLE newProcessHandle;
+ STARTUPINFOEX startupInfo;
+ SIZE_T attributeListLength = 0;
+
+ memset(&startupInfo, 0, sizeof(STARTUPINFOEX));
+ startupInfo.StartupInfo.cb = sizeof(STARTUPINFOEX);
+ startupInfo.StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
+ startupInfo.StartupInfo.wShowWindow = SW_SHOWNORMAL;
+
+ status = PhOpenProcess(
+ &processHandle,
+ PROCESS_CREATE_PROCESS,
+ context->ProcessId
+ );
+
+ if (!NT_SUCCESS(status))
+ goto CleanupExit;
+
+ if (!InitializeProcThreadAttributeList(NULL, 1, 0, &attributeListLength) && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
+ {
+ status = PhGetLastWin32ErrorAsNtStatus();
+ goto CleanupExit;
+ }
+
+ startupInfo.lpAttributeList = PhAllocate(attributeListLength);
+
+ if (!InitializeProcThreadAttributeList(startupInfo.lpAttributeList, 1, 0, &attributeListLength))
+ {
+ status = PhGetLastWin32ErrorAsNtStatus();
+ goto CleanupExit;
+ }
+
+ if (!UpdateProcThreadAttribute(startupInfo.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &processHandle, sizeof(HANDLE), NULL, NULL))
+ {
+ status = PhGetLastWin32ErrorAsNtStatus();
+ goto CleanupExit;
+ }
+
+ status = PhCreateProcessWin32Ex(
+ NULL,
PhGetString(program),
- PhGetString(username),
- PhGetStringOrEmpty(password),
- logonType,
- context->ProcessId,
- sessionId,
- PhGetString(desktopName),
- useLinkedToken,
- createSuspended
+ NULL,
+ NULL,
+ &startupInfo.StartupInfo,
+ PH_CREATE_PROCESS_SUSPENDED | PH_CREATE_PROCESS_NEW_CONSOLE | PH_CREATE_PROCESS_EXTENDED_STARTUPINFO,
+ NULL,
+ NULL,
+ &newProcessHandle,
+ NULL
);
+
+ if (NT_SUCCESS(status))
+ {
+ PROCESS_BASIC_INFORMATION basicInfo;
+
+ if (NT_SUCCESS(PhGetProcessBasicInformation(newProcessHandle, &basicInfo)))
+ {
+ AllowSetForegroundWindow(HandleToUlong(basicInfo.UniqueProcessId));
+ }
+
+ NtResumeProcess(newProcessHandle);
+ NtClose(newProcessHandle);
+ }
+
+ CleanupExit:
+
+ if (startupInfo.lpAttributeList)
+ {
+ DeleteProcThreadAttributeList(startupInfo.lpAttributeList);
+ PhFree(startupInfo.lpAttributeList);
+ }
+
+ if (processHandle)
+ {
+ NtClose(processHandle);
+ }
+
+ // TODO: Commented out while testing above method (dmex)
+ //status = PhExecuteRunAsCommand3(
+ // hwndDlg,
+ // PhGetString(program),
+ // PhGetString(username),
+ // PhGetStringOrEmpty(password),
+ // logonType,
+ // context->ProcessId,
+ // sessionId,
+ // PhGetString(desktopName),
+ // useLinkedToken,
+ // createSuspended
+ // );
}
}
else
|
sse2: work around GCC bug Again.
Apparently left shift suffers from the same issue. | @@ -680,6 +680,9 @@ HEDLEY_STATIC_ASSERT(sizeof(simde_float64) == 8, "Unable to find 64-bit floating
# if defined(SIMDE_ARCH_X86) && !defined(SIMDE_ARCH_AMD64)
# define SIMDE_BUG_GCC_94482
# endif
+# if defined(SIMDE_ARCH_AARCH64)
+# define SIMDE_BUG_GCC_94488
+# endif
# endif
# if defined(HEDLEY_EMSCRIPTEN_VERSION)
# define SIMDE_BUG_EMSCRIPTEN_MISSING_IMPL /* Placeholder for (as yet) unfiled issues. */
|
Reorder decoder functions
This will make further commits more readable. | #include "video_buffer.h"
#include "util/log.h"
-void
-decoder_init(struct decoder *decoder, struct video_buffer *vb) {
- decoder->video_buffer = vb;
-}
-
bool
decoder_open(struct decoder *decoder, const AVCodec *codec) {
decoder->codec_ctx = avcodec_alloc_context3(codec);
@@ -63,3 +58,8 @@ decoder_push(struct decoder *decoder, const AVPacket *packet) {
}
return true;
}
+
+void
+decoder_init(struct decoder *decoder, struct video_buffer *vb) {
+ decoder->video_buffer = vb;
+}
|
Update hcxpcapngtool.c
some simple spelling fixes | @@ -504,7 +504,7 @@ if(actioncount > 0) printf("ACTION (total)...........................: %ld\n",
if(awdlcount > 0) printf("AWDL (Apple Wireless Direct Link)........: %ld\n", awdlcount);
if(proberequestcount > 0) printf("PROBEREQUEST.............................: %ld\n", proberequestcount);
if(proberequestdirectedcount > 0) printf("PROBEREQUEST (directed)..................: %ld\n", proberequestdirectedcount);
-if(proberesponsecount > 0) printf("PROBERESONSE.............................: %ld\n", proberesponsecount);
+if(proberesponsecount > 0) printf("PROBERESPONSE.............................: %ld\n", proberesponsecount);
if(deauthenticationcount > 0) printf("DEAUTHENTICATION (total).................: %ld\n", deauthenticationcount);
if(disassociationcount > 0) printf("DISASSOCIATION (total)...................: %ld\n", disassociationcount);
if(authenticationcount > 0) printf("AUTHENTICATION (total)...................: %ld\n", authenticationcount);
@@ -559,7 +559,7 @@ if(eapolrc4count > 0) printf("EAPOL RC4 messages.......................: %ld\n
if(eapolrsncount > 0) printf("EAPOL RSN messages.......................: %ld\n", eapolrsncount);
if(eapolwpacount > 0) printf("EAPOL WPA messages.......................: %ld\n", eapolwpacount);
if(essidcount > 0) printf("ESSID (total unique).....................: %ld\n", essidcount);
-if(essiddupemax > 0) printf("ESSID changes (mesured maximum)..........: %ld (warning)\n", essiddupemax);
+if(essiddupemax > 0) printf("ESSID changes (measured maximum)..........: %ld (warning)\n", essiddupemax);
if(eaptimegapmax > 0) printf("EAPOLTIME gap (measured maximum usec)....: %" PRId64 "\n", eaptimegapmax);
if((eapolnccount > 0) && (eapolmpcount > 0))
{
|
set max sidetone level to a lower value in sdr-transceiver-hpsdr.c | @@ -582,7 +582,7 @@ int main(int argc, char *argv[])
*dac_size = size;
/* set default dac level */
- *dac_level = 32766;
+ *dac_level = 1600;
}
else
{
@@ -1110,7 +1110,7 @@ void process_ep2(uint8_t *frame)
if(i2c_codec)
{
data = dac_level_data;
- *dac_level = (int16_t)floor(data * 128.494 + 0.5);
+ *dac_level = data * 16;
}
break;
case 32:
|
Simplified ++word parsing, no longer produces (list graf), now just graf. | [i.los $(los +.los)]
:: ::
++ word :: flow parser
- %+ knee *(list graf) |. ~+
+ %+ knee *graf |. ~+
;~ pose
::
:: whitespace
::
- (cold [%text " "]~ whit)
+ (stag %text (cold " " whit))
::
:: ordinary word
::
- %+ cook |=(graf [+< ~])
(stag %text ;~(plug ;~(pose low hig) (star ;~(pose nud low hig hep))))
::
:: naked \escape
::
- %+ cook |=(@ [%text [+< ~]]~)
- ;~(pfix bas ;~(less ace prn))
+ (stag %text ;~(pfix bas (cook trip ;~(less ace prn))))
::
:: *bold literal*
::
- %+ cook |=(graf [+< ~])
(stag %bold ;~(pfix tar (cool (cash tar) work)))
::
:: _italic literal_
::
- %+ cook |=(graf [+< ~])
(stag %talc ;~(pfix cab (cool (cash cab) work)))
::
:: "quoted text"
::
- %+ cook |=(graf [+< ~])
(stag %quod ;~(pfix doq (cool (cash doq) work)))
::
:: `classic markdown quote`
::
- %+ cook |=(graf [+< ~])
(stag %code ;~(pfix tec (cash tec)))
::
:: #twig
::
- %+ cook |=(graf [+< ~])
(stag %code ;~(pfix hax (echo wide:vast)))
::
:: ++arm
::
- %+ cook |=(graf [+< ~])
(stag %code ;~(plug lus lus low (star ;~(pose nud low hep))))
::
:: [arbitrary *content*](url)
::
- %+ cook |=(graf [+< ~])
%+ stag %link
;~ plug
;~(pfix sel (cool (cash ser) work))
::
:: direct hoon constant
::
- %+ cook |=(graf [+< ~])
%+ stag %code
%- echo
;~ pose
::
:: just a byte
::
- (cook |=(@ [%text [+< ~]]~) ;~(less ace prn))
+ (stag %text (cook trip ;~(less ace prn)))
==
:: ::
- ++ work :: indefinite flow
- %+ cook
- |=((list (list graf)) (zing +<))
- (star word)
+ ++ work (star word) :: indefinite flow
:: ::
++ down :: parse inline flow
%+ knee *marl:dynamic |. ~+
|
Adding implementation details for the Arty. | @@ -69,6 +69,12 @@ Adding this config. fragment will enable and connect the JTAG, UART, SPI, and I2
Future peripherals to be supported include the Arty's SPI Flash EEPROM.
+Brief Implementation Description for Less Complicated Designs (Such as Arty), and Guidance for Adding/Changing Xilinx Collateral
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Like the VCU118, the basis for the Arty design is the creation of a special test harness that connects the external IO (which exist as Xilinx IP blackboxes) to the Chipyard design.
+This is done with the ``ArtyTestHarness`` in the basic default Arty target. However, unlike the ``VCU118TestHarness``, the ``ArtyTestHarness`` uses no ``Overlay``s, and instead directly connects chip top IO to the ports of the external IO blackboxes, using functions such as ``IOBUF`` provided by ``fpga-shells``. Unlike the VCU118 and other more complicated test harnesses, the Arty's Vivado collateral is not generated by ``Overlay``s, but rather are a static collection of ``create_ip`` and ``set_properties`` statements located in the files within ``fpga/fpga-shells/xilinx/arty/tcl`` and ``fpga/fpga-shells/xilinx/arty/constraints``. If the user wishes to re-map FPGA package pins to different harness-level IO, this may be changed within ``fpga/fpga-shells/xilinx/arty/constraints/arty-master.xdc``. The addition of new Xilinx IP blocks may be done in ``fpga-shells/xilinx/arty/tcl/ip.tcl``, mapped to harness-level IOs in ``arty-master.xdc``, and wired through from the test harness to the chip top using ``HarnessBinder``s and ssIOBinder``s.
+
Running a Design on VCU118
--------------------------
|
CoreValidation: Fixed CoreFunc tests for GCC on ARMv8-MB. | @@ -134,7 +134,7 @@ void TC_CoreFunc_IPSR (void) {
#if defined(__CC_ARM)
#define SUBS(Rd, Rm, Rn) __ASM("SUBS " # Rd ", " # Rm ", " # Rn)
#define ADDS(Rd, Rm, Rn) __ASM("ADDS " # Rd ", " # Rm ", " # Rn)
-#elif defined( __GNUC__ ) && defined(__ARM_ARCH_6M__)
+#elif defined( __GNUC__ ) && (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__))
#define SUBS(Rd, Rm, Rn) __ASM("SUB %0, %1, %2" : "=r"(Rd) : "r"(Rm), "r"(Rn) : "cc")
#define ADDS(Rd, Rm, Rn) __ASM("ADD %0, %1, %2" : "=r"(Rd) : "r"(Rm), "r"(Rn) : "cc")
#elif defined(_lint)
|
BugID:17522316:fix white scan issue | @@ -373,7 +373,7 @@ void user_post_property(void)
static int example_index = 0;
int res = 0;
user_example_ctx_t *user_example_ctx = user_example_get_ctx();
- char *property_payload = NULL;
+ char *property_payload = "NULL";
if (example_index == 0) {
/* Normal Example */
@@ -417,7 +417,7 @@ void user_post_event(void)
int res = 0;
user_example_ctx_t *user_example_ctx = user_example_get_ctx();
char *event_id = "Error";
- char *event_payload = NULL;
+ char *event_payload = "NULL";
if (example_index == 0) {
/* Normal Example */
|
webterm: clean up component state derivation | @@ -6,8 +6,7 @@ import React, {
import Helmet from 'react-helmet';
import useTermState from '~/logic/state/term';
-import useSettingsState from '~/logic/state/settings';
-import useLocalState from '~/logic/state/local';
+import { useDark } from '~/logic/state/join';
import { Terminal, ITerminalOptions, ITheme } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
@@ -278,15 +277,8 @@ export default function TermApp(props: TermAppProps) {
const container = useRef<HTMLDivElement>(null);
// TODO allow switching of selected
const { sessions, selected, slogstream, set } = useTermState();
-
- const session = useTermState(useCallback(
- state => state.sessions[state.selected],
- [selected, sessions]
- ));
-
- const osDark = useLocalState(state => state.dark);
- const theme = useSettingsState(s => s.display.theme);
- const dark = theme === 'dark' || (theme === 'auto' && osDark);
+ const session = sessions[selected];
+ const dark = useDark();
const setupSlog = useCallback(() => {
console.log('slog: setting up...');
|
Remove Python2-xml dep | @@ -94,7 +94,7 @@ BuildRequires: libXext-devel
BuildRequires: libXft-devel
BuildRequires: fontconfig
BuildRequires: timezone
-BuildRequires: python-xml
+#BuildRequires: python-xml
%else
BuildRequires: expat-devel
BuildRequires: openssl-devel
|
Allow config values to work in unit tests | @@ -670,6 +670,10 @@ void config_read(SurviveContext *sctx, const char *path) {
}
static config_entry *sc_search(SurviveContext *ctx, const char *tag) {
+ if (ctx == 0) {
+ return 0;
+ }
+
config_entry *cv = find_config_entry(ctx->temporary_config_values, tag);
if (!cv) {
cv = find_config_entry(ctx->global_config_values, tag);
@@ -731,7 +735,7 @@ FLT survive_configf(SurviveContext *ctx, const char *tag, char flags, FLT def) {
}
}
-
+ if (ctx) {
// If override is flagged, or, we can't find the variable, ,continue on.
if (flags & SC_SETCONFIG) {
config_set_float(ctx->temporary_config_values, tag, def);
@@ -739,6 +743,7 @@ FLT survive_configf(SurviveContext *ctx, const char *tag, char flags, FLT def) {
} else if (flags & SC_SET) {
config_set_float(ctx->temporary_config_values, tag, def);
}
+ }
return def;
}
@@ -762,7 +767,7 @@ uint32_t survive_configi(SurviveContext *ctx, const char *tag, char flags, uint3
}
}
-
+ if (ctx) {
// If override is flagged, or, we can't find the variable, ,continue on.
if (flags & SC_SETCONFIG) {
config_set_uint32(ctx->temporary_config_values, tag, def);
@@ -770,6 +775,7 @@ uint32_t survive_configi(SurviveContext *ctx, const char *tag, char flags, uint3
} else if (flags & SC_SET) {
config_set_uint32(ctx->temporary_config_values, tag, def);
}
+ }
return def;
}
@@ -823,9 +829,6 @@ const char *survive_configs(SurviveContext *ctx, const char *tag, char flags, co
static void survive_attach_config(SurviveContext *ctx, const char *tag, void * var, char type )
{
- if (ctx == 0)
- return;
-
config_entry *cv = sc_search(ctx, tag);
if( !cv )
{
@@ -844,21 +847,22 @@ static void survive_attach_config(SurviveContext *ctx, const char *tag, void * v
memcpy( var, cv, strlen(cv) );
}
cv = sc_search(ctx, tag);
- if( !cv )
- {
+ if (!cv && ctx) {
SV_GENERAL_ERROR("Configuration item %s not initialized.\n", tag);
return;
}
- }
+ } else {
update_list_t **ul = &cv->update_list;
- while( *ul )
- {
- if( (*ul)->value == var ) return;
+ while (*ul) {
+ if ((*ul)->value == var)
+ return;
ul = &((*ul)->next);
}
+
update_list_t *t = *ul = malloc(sizeof(update_list_t));
t->next = 0;
t->value = var;
+ }
switch (type) {
case 'i':
|
Use calloc to allocate unique visitors key and initialize buffer.
This could possibly fix the use of uninitialised value reported by
Valgrind resulting on an invalid read and therefore corrupting the
btree db files. | @@ -1885,7 +1885,7 @@ get_uniq_visitor_key (GLogItem * logitem)
s3 = strlen (ua);
/* includes terminating null */
- key = xmalloc (s1 + s2 + s3 + 3);
+ key = xcalloc (s1 + s2 + s3 + 3, sizeof (char));
memcpy (key, logitem->host, s1);
|
Docs - typo fix in xml | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
-<topic id="topic1" other_props="pivotal">
+<topic id="topic1" otherprops="pivotal">
<title>gpbackup_manager</title>
<body>
<p>Display information about existing backups, delete existing backups, or encrypt passwords for
|
luci-app-argon-config: add luci-lib-ipkg interface
fix | @@ -11,8 +11,10 @@ PKG_VERSION:=0.9
PKG_RELEASE:=20210309
LUCI_TITLE:=LuCI page for Argon Config
-LUCI_DEPENDS:=+luci-theme-argon
LUCI_PKGARCH:=all
+LUCI_DEPENDS:= \
+ +luci-theme-argon \
+ +luci-lib-ipkg
include ../../luci.mk
|
dill: resolve review questions | =/ zon=axon [app input=[~ ~] width=80]
::
=^ moz all abet:(~(into as duc %$ zon) ~)
- ::REVIEW can anything relevant happen between %boot and %init?
=. eye.all (~(put ju eye.all) %$ duc)
[moz ..^$]
:: %flog tasks are unwrapped and sent back to us on our default duct
!!
=/ zon=axon [p.task ~ width=80]
=^ moz all abet:(~(open as hen ses zon) q.task)
- ::REVIEW we might want a separate, explicit %view,
- :: but then we could miss some initial blits...
- :: do we care about that?
=. eye.all (~(put ju eye.all) ses hen)
[moz ..^$]
:: %shut closes an existing dill session
|
Identified purpose of another Xiaomi specific attribute
0x0202 = Auto-off after 20m below 2W | @@ -2802,7 +2802,7 @@ Fil pilote > Off=0001 - On=0002</description>
<attribute id="0x0100" name="Unknown" type="u8" mfcode="0x115f" access="rw" required="m"> </attribute>
<attribute id="0x0200" name="Unknown" type="u8" mfcode="0x115f" access="rw" required="m"> </attribute>
<attribute id="0x0201" name="Restore Power on Outage" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute>
- <attribute id="0x0202" name="Unknown" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute>
+ <attribute id="0x0202" name="Auto-off after 20m below 2W" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute>
<attribute id="0x0203" name="Device LED off" type="bool" mfcode="0x115f" access="rw" required="m"> </attribute>
<attribute id="0x0204" name="Unknown" type="float" mfcode="0x115f" access="rw" required="m"> </attribute>
<attribute id="0x0205" name="Unknown" type="u8" mfcode="0x115f" access="rw" required="m"> </attribute>
|
options/ansi: Stub strptime | @@ -561,8 +561,8 @@ char *ctime_r(const time_t *, char *) {
char *strptime(const char *__restrict, const char *__restrict,
struct tm *__restrict) {
- __ensure(!"Not implemented");
- __builtin_unreachable();
+ mlibc::infoLogger() << "mlibc: strptime is a stub!" << frg::endlog;
+ return nullptr;
}
time_t timelocal(struct tm *) {
|
Use clone_epsdb_test for run_rocm_test | @@ -265,7 +265,7 @@ copyresults omp5
mkdir -p "$resultsdir"/sollve45
mkdir -p "$resultsdir"/sollve50
cd "$aompdir"/bin
-./clone_aomp_test.sh
+./clone_epsdb_test.sh
SKIP_SOLLVE51=1 ./run_sollve.sh
./check_sollve.sh
checkrc $?
|
correct cmake options when building for nvidia with cuda installed | @@ -18,6 +18,13 @@ if [ "$AOMP_USE_NINJA" == 0 ] ; then
else
_set_ninja_gan="-G Ninja"
fi
+if [ "$TRUNK_BUILD_CUDA" == 0 ] ; then
+ _cuda_plugin="-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF"
+ _targets_to_build="-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU'"
+else
+ _cuda_plugin="-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=ON"
+ _targets_to_build="-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;NVPTX'"
+fi
# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
# -DFLANG_ENABLE_WERROR=ON \
@@ -31,11 +38,11 @@ $_set_ninja_gan \
-DLLVM_ENABLE_PROJECTS='lld;clang;mlir;openmp' \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$TRUNK_INSTALL_DIR \
--DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;NVPTX' \
+$_targets_to_build \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_INSTALL_UTILS=ON \
-DCMAKE_CXX_STANDARD=17 \
--DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF \
+$_cuda_plugin \
-DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
"
|
Improve accuracy of FPS calculation.
Use microseconds instead of milliseconds to measure the time since the
last update. With this, the FPS display can actually show 60 instead of
bouncing between 58 and 62. | @@ -16192,8 +16192,8 @@ void pausemenu()
unsigned getFPS(void)
{
- static unsigned lasttick = 0, framerate = 0;
- unsigned curtick = timer_gettick();
+ static u64 lasttick = 0, framerate = 0;
+ u64 curtick = timer_uticks();
if(lasttick > curtick)
{
lasttick = curtick;
@@ -16208,7 +16208,7 @@ unsigned getFPS(void)
#ifdef PSP
return ((10000000 / framerate) + 9) / 10;
#else
- return ((10000000 / framerate) + 9) / 10000;
+ return round(1.0e6 / framerate);
#endif
}
|
Small typo in ftp server fails compilation
There sneaked in an 'o' at the beginning of the file | -o--[[ A simple ftp server
+--[[ A simple ftp server
This is my implementation of a FTP server using Github user Neronix's
example as inspriration, but as a cleaner Lua implementation that has been
|
ip: Adding IP tables is no MP safe
Type: fix
it was marked MP safe in the CLI (which it shouldn't be) but
it it not marked MP safe on the API. | @@ -640,7 +640,6 @@ VLIB_CLI_COMMAND (ip4_table_command, static) = {
.path = "ip table",
.short_help = "ip table [add|del] <table-id>",
.function = vnet_ip4_table_cmd,
- .is_mp_safe = 1,
};
/* *INDENT-ON* */
@@ -656,7 +655,6 @@ VLIB_CLI_COMMAND (ip6_table_command, static) = {
.path = "ip6 table",
.short_help = "ip6 table [add|del] <table-id>",
.function = vnet_ip6_table_cmd,
- .is_mp_safe = 1,
};
static clib_error_t *
|
plugin BUGFIX fix eventual double free.
fix eventual double free when call lydict_insert_zc fail in store_bists function | @@ -1199,9 +1199,9 @@ next:
if (!ws_count && !lws_count && (options & LY_TYPE_STORE_DYNAMIC)) {
ret = lydict_insert_zc(ctx, (char *)value, &can);
- LY_CHECK_GOTO(ret, cleanup);
value = NULL;
options &= ~LY_TYPE_STORE_DYNAMIC;
+ LY_CHECK_GOTO(ret, cleanup);
} else {
ret = lydict_insert(ctx, value_len ? &value[lws_count] : "", value_len - ws_count - lws_count, &can);
LY_CHECK_GOTO(ret, cleanup);
|
Make sure to use the arm version of dynamic.c in ARM64 DYNAMIC_ARCH
cf. | @@ -47,7 +47,11 @@ GenerateNamedObjects("abs.c" "DOUBLE" "z_abs" 0 "" "" 1)
GenerateNamedObjects("openblas_get_config.c;openblas_get_parallel.c" "" "" 0 "" "" 1)
if (DYNAMIC_ARCH)
+ if (ARM64)
+ list(APPEND COMMON_SOURcES dynamic_arm64.c)
+ else ()
list(APPEND COMMON_SOURCES dynamic.c)
+ endif ()
else ()
list(APPEND COMMON_SOURCES parameter.c)
endif ()
|
pocl_cache.c: add SPIR-V spec constants and program binary type to hash | @@ -386,6 +386,10 @@ build_program_compute_hash (cl_program program, unsigned device_i,
pocl_SHA1_Update(&hash_ctx, (uint8_t*) program->compiler_options,
strlen(program->compiler_options));
+ pocl_SHA1_Update (&hash_ctx,
+ (uint8_t *)&program->binary_type,
+ sizeof(cl_program_binary_type));
+
#ifdef ENABLE_LLVM
/* The kernel compiler work-group function method affects the
produced binary heavily. */
@@ -399,6 +403,21 @@ build_program_compute_hash (cl_program program, unsigned device_i,
}
#endif
+#ifdef ENABLE_SPIR
+ for (size_t i = 0; i < program->num_spec_consts; ++i)
+ {
+ if (program->spec_const_is_set[i])
+ {
+ pocl_SHA1_Update (&hash_ctx,
+ (uint8_t *)&program->spec_const_ids[i],
+ sizeof (cl_uint));
+ pocl_SHA1_Update (&hash_ctx,
+ (uint8_t *)&program->spec_const_values[i],
+ program->spec_const_sizes[i]);
+ }
+ }
+#endif
+
/*devices may include their own information to hash */
if (device->ops->build_hash)
{
|
Fix iOS build script compatibility issue with certain Python versions | @@ -299,7 +299,7 @@ args.defines += ';' + getProfile(args.profile).get('defines', '')
if args.metalangle:
args.defines += ';' + '_CARTO_USE_METALANGLE'
else:
- if filter(lambda arch: arch.endswith('-maccatalyst'), args.iosarch):
+ if list(filter(lambda arch: arch.endswith('-maccatalyst'), args.iosarch)):
print('Mac Catalyst builds are only supported with MetalANGLE')
sys.exit(-1)
args.cmakeoptions += ';' + getProfile(args.profile).get('cmake-options', '')
|
Implement uninitialized resize in protobuf. | @@ -65,7 +65,9 @@ void STLDeleteContainerPointers(ForwardIterator begin,
// place in open source code. Feel free to fill this function in with your
// own disgusting hack if you want the perf boost.
inline void STLStringResizeUninitialized(string* s, size_t new_size) {
- s->resize(new_size);
+// Yandex-specific: uninitialized resizing.
+ s->ReserveAndResize(new_size);
+// End of Yandex-specific.
}
// Return a mutable char* pointing to a string's internal buffer,
|
Remove unneccessary classes_ property redefinition and corresponding _classes attribute in CatBoostClassifier. Recreate train_pool only if it is needed for get_feature_importance when model has no leaf weights data and do pass to get_feature_importance in this case (was broken). | @@ -833,7 +833,7 @@ class _CatBoostBase(object):
params['_test_evals'] = test_evals
if self.is_fitted():
params['__model'] = self._serialize_model()
- for attr in ['_classes', '_prediction_values_change', '_loss_value_change']:
+ for attr in ['_prediction_values_change', '_loss_value_change']:
if getattr(self, attr, None) is not None:
params[attr] = getattr(self, attr, None)
return params
@@ -853,7 +853,7 @@ class _CatBoostBase(object):
if '_test_evals' in state:
self._set_test_evals(state['_test_evals'])
del state['_test_evals']
- for attr in ['_classes', '_prediction_values_change', '_loss_value_change']:
+ for attr in ['_prediction_values_change', '_loss_value_change']:
if attr in state:
setattr(self, attr, state[attr])
del state[attr]
@@ -1282,18 +1282,19 @@ class CatBoost(_CatBoostBase):
with log_fixup(), plot_wrapper(plot, [_get_train_dir(self.get_params())]):
self._train(train_pool, eval_sets, params, allow_clear_pool, init_model)
- if (not self._object._has_leaf_weights_in_model()) and allow_clear_pool:
- train_pool = _build_train_pool(X, y, cat_features, pairs, sample_weight, group_id, group_weight, subgroup_id, pairs_weight, baseline, column_description)
if self._object._is_oblivious():
# Have property feature_importance possibly set
loss = self._object._get_loss_function_name()
if loss and is_groupwise_metric(loss):
pass # too expensive
+ else:
+ if not self._object._has_leaf_weights_in_model():
+ if allow_clear_pool:
+ train_pool = _build_train_pool(X, y, cat_features, pairs, sample_weight, group_id, group_weight, subgroup_id, pairs_weight, baseline, column_description)
+ self.get_feature_importance(data=train_pool, type=EFstrType.PredictionValuesChange)
else:
self.get_feature_importance(type=EFstrType.PredictionValuesChange)
- if 'loss_function' in params and self._is_classification_objective(params['loss_function']):
- setattr(self, "_classes", np.unique(train_pool.get_label()))
return self
def fit(self, X, y=None, cat_features=None, pairs=None, sample_weight=None, group_id=None,
@@ -2834,10 +2835,6 @@ class CatBoostClassifier(CatBoost):
super(CatBoostClassifier, self).__init__(params)
- @property
- def classes_(self):
- return getattr(self, "_classes", None)
-
def fit(self, X, y=None, cat_features=None, sample_weight=None, baseline=None, use_best_model=None,
eval_set=None, verbose=None, logging_level=None, plot=False, column_description=None,
verbose_eval=None, metric_period=None, silent=None, early_stopping_rounds=None,
|
ish: correct gpio voltage to 3.3V
The sensor interrupt signal is 3.3V not 1.8V and
ISH GPIO does not support 3.3V away. This was benign but incorrect.
BRANCH=none
TEST=sensor still work | * found in the LICENSE file.
*/
-GPIO_INT(ACCEL_GYRO_INT_L, PIN(0), GPIO_INT_FALLING | GPIO_SEL_1P8V, lsm6dsm_interrupt)
+GPIO_INT(ACCEL_GYRO_INT_L, PIN(0), GPIO_INT_FALLING, lsm6dsm_interrupt)
GPIO_INT(LID_OPEN, PIN(5), GPIO_INT_BOTH, lid_interrupt) /* LID_CL_NB_L */
GPIO(NB_MODE_L, PIN(4), GPIO_OUT_LOW)
|
Default nums of RX/TX descriptors changed to 512 for 2M page on DVN
As DVN has fewer DTLB entries supported for 2M page, default numbers of
RX/TX descriptors are changed to 512 if nums of RX/TX descriptors are not
specified by VPP users. | #include <sys/mount.h>
#include <string.h>
#include <fcntl.h>
+#include <dirent.h>
#include <dpdk/device/dpdk_priv.h>
@@ -157,6 +158,47 @@ dpdk_port_crc_strip_enabled (dpdk_device_t * xd)
return !(xd->port_conf.rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC);
}
+/* The funciton check_l3cache helps check if Level 3 cache exists or not on current CPUs
+ return value 1: exist.
+ return value 0: not exist.
+*/
+static int
+check_l3cache ()
+{
+
+ struct dirent *dp;
+ clib_error_t *err;
+ const char *sys_cache_dir = "/sys/devices/system/cpu/cpu0/cache";
+ DIR *dir_cache = opendir (sys_cache_dir);
+
+ if (dir_cache == NULL)
+ return -1;
+
+ while ((dp = readdir (dir_cache)) != NULL)
+ {
+ if (dp->d_type == DT_DIR)
+ {
+ u8 *p = NULL;
+ int level_cache = -1;
+
+ p = format (p, "%s/%s/%s", sys_cache_dir, dp->d_name, "level");
+ if ((err = clib_sysfs_read ((char *) p, "%d", &level_cache)))
+ clib_error_free (err);
+
+ if (level_cache == 3)
+ {
+ closedir (dir_cache);
+ return 1;
+ }
+ }
+ }
+
+ if (dir_cache != NULL)
+ closedir (dir_cache);
+
+ return 0;
+}
+
static clib_error_t *
dpdk_lib_init (dpdk_main_t * dm)
{
@@ -501,9 +543,29 @@ dpdk_lib_init (dpdk_main_t * dm)
if (devconf->num_rx_desc)
xd->nb_rx_desc = devconf->num_rx_desc;
+ else {
+
+ /* If num_rx_desc is not specified by VPP user, the current CPU is working
+ with 2M page and has no L3 cache, default num_rx_desc is changed to 512
+ from original 1024 to help reduce TLB misses.
+ */
+ if ((clib_mem_get_default_hugepage_size () == 2 << 20)
+ && check_l3cache() == 0)
+ xd->nb_rx_desc = 512;
+ }
if (devconf->num_tx_desc)
xd->nb_tx_desc = devconf->num_tx_desc;
+ else {
+
+ /* If num_tx_desc is not specified by VPP user, the current CPU is working
+ with 2M page and has no L3 cache, default num_tx_desc is changed to 512
+ from original 1024 to help reduce TLB misses.
+ */
+ if ((clib_mem_get_default_hugepage_size () == 2 << 20)
+ && check_l3cache() == 0)
+ xd->nb_tx_desc = 512;
+ }
}
if (xd->pmd == VNET_DPDK_PMD_AF_PACKET)
|
Fix typo and reduce 2 newlines at end to 1 | @@ -78,5 +78,4 @@ You can create a `tic80` folder into your SD card to put your carts in.
# Thanks
-This project is built on two awesome projects, [circle](https://github.com/rsta2/circle) and [circle-stdlib](https://github.com/smuehlst/circle-stdlib). Without them, this version of TIC-80 would not exists.
-
+This project is built on two awesome projects, [circle](https://github.com/rsta2/circle) and [circle-stdlib](https://github.com/smuehlst/circle-stdlib). Without them, this version of TIC-80 would not exist.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.