type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines | #define __SIGACTION _sigaction |
defines | #define _NSIG NSIG |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
defines | #define init_done() (__next_sigaction != 0) |
defines | #define __SIGACTION __libc_sigaction |
defines | #define _NSIG NSIG |
defines | #define INIT() do { if (!init_done()) do_init(); } while (0) |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "__sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym");
abort();
} |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "__sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym");
abort();
} |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym");
abort();
} |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym_darwin");
abort();
} |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "_sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym");
abort();
} |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym_freebsd");
abort();
} |
functions | void do_init(void)
{
__next_sigaction = dlsym(RTLD_NEXT, "__libc_sigaction");
if (__next_sigaction != 0)
return;
perror("dlsym");
abort();
} |
functions | int my_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
{
struct sigaction newact;
INIT();
if (act &&
act->sa_handler != SIG_DFL &&
act->sa_handler != SIG_IGN &&
!(act->sa_flags & SA_ONSTACK)) {
newact = *act;
newact.sa_flags |= SA_ONSTACK;
act = &newact;
} |
functions | int __SIGACTION(int signum, const struct sigaction *act, struct sigaction *oldact)
{
return my_sigaction(signum, act, oldact);
} |
functions | int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
{
return my_sigaction(signum, act, oldact);
} |
functions | void hipe_sigaltstack(void *ss_sp)
{
stack_t ss;
ss.ss_sp = ss_sp;
ss.ss_flags = SS_ONSTACK;
ss.ss_size = SIGSTKSZ;
if (sigaltstack(&ss, NULL) < 0) {
/* might be a broken pre-2.4 Linux kernel, try harder */
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) < 0) {
perror("sigaltstack");
abort... |
functions | void hipe_thread_signal_init(void)
{
/* Stack don't really need to be cache aligned.
We use it to suppress false leak report from valgrind */
hipe_sigaltstack(erts_alloc_permanent_cache_aligned(ERTS_ALC_T_HIPE, SIGSTKSZ));
} |
functions | void hipe_sigaltstack_init(void)
{
#if !defined(ERTS_SMP)
static unsigned long my_sigstack[SIGSTKSZ/sizeof(long)];
hipe_sigaltstack(my_sigstack);
#endif
} |
functions | void hipe_signal_init(void)
{
struct sigaction sa;
int i;
#ifndef __NetBSD__
INIT();
#endif
hipe_sigaltstack_init();
for (i = 1; i < _NSIG; ++i) {
if (sigaction(i, NULL, &sa)) {
/* This will fail with EINVAL on Solaris if 'i' is one of the
thread library's private signals. We DO cat... |
includes |
#include <sophia.h> |
includes | #include <libss.h> |
includes | #include <libsf.h> |
includes | #include <libsr.h> |
includes | #include <libsv.h> |
includes | #include <libsd.h> |
includes | #include <libst.h> |
functions | void
cursor_md_test0(void)
{
void *env = sp_env();
t( env != NULL );
t( sp_setstring(env, "sophia.path", st_r.conf->sophia_dir, 0) == 0 );
t( sp_setint(env, "scheduler.threads", 0) == 0 );
t( sp_setstring(env, "log.path", st_r.conf->log_dir, 0) == 0 );
t( sp_setstring(env, "db", "t0", 0) == 0 );
t( sp_setstring(... |
includes |
#include <stdlib.h> |
includes | #include <string.h> |
includes |
#include <example_debug.h> |
includes | #include <odp_api.h> |
includes | #include <odp_l3fwd_db.h> |
defines | #define _GNU_SOURCE |
defines | #define JHASH_GOLDEN_RATIO 0x9e3779b9 |
defines | #define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k)))) |
defines | #define FWD_BJ3_MIX(a, b, c) \ |
functions | uint64_t l3fwd_calc_hash(ipv4_tuple5_t *key)
{
uint64_t l4_ports = 0;
uint32_t dst_ip, src_ip;
src_ip = key->src_ip;
dst_ip = key->dst_ip + JHASH_GOLDEN_RATIO;
FWD_BJ3_MIX(src_ip, dst_ip, l4_ports);
return l4_ports;
} |
functions | int parse_ipv4_string(char *ipaddress, uint32_t *addr, uint32_t *depth)
{
int b[4];
int qualifier = 32;
int converted;
uint32_t addr_le;
if (strchr(ipaddress, '/')) {
converted = sscanf(ipaddress, "%d.%d.%d.%d/%d",
&b[3], &b[2], &b[1], &b[0],
&qualifier);
if (5 != converted)
return -1;
} |
functions | void create_fwd_hash_cache(void)
{
odp_shm_t hash_shm;
flow_bucket_t *bucket;
flow_entry_t *flows;
uint32_t bucket_count, flow_count, size;
uint32_t i;
flow_count = FWD_MAX_FLOW_COUNT;
bucket_count = flow_count / FWD_DEF_BUCKET_ENTRIES;
/*Reserve memory for Routing hash table*/
size = sizeof(flow_bucket... |
functions | int match_key_flow(ipv4_tuple5_t *key, flow_entry_t *flow)
{
if (key->hi64 == flow->key.hi64 && key->lo64 == flow->key.lo64)
return 1;
return 0;
} |
functions | void init_fwd_hash_cache(void)
{
fwd_db_entry_t *entry;
flow_entry_t *flow;
flow_bucket_t *bucket;
uint64_t hash;
uint32_t i, nb_hosts;
ipv4_tuple5_t key;
create_fwd_hash_cache();
/**
* warm up the lookup cache with possible hosts.
* with millions flows, save significant time during runtime.
*/
memset(... |
functions | void init_fwd_db(void)
{
odp_shm_t shm;
shm = odp_shm_reserve("shm_fwd_db",
sizeof(fwd_db_t),
ODP_CACHE_LINE_SIZE,
0);
fwd_db = odp_shm_addr(shm);
if (fwd_db == NULL) {
EXAMPLE_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
} |
functions | int create_fwd_db_entry(char *input, char **oif, uint8_t **dst_mac)
{
int pos = 0;
char *local;
char *str;
char *save;
char *token;
fwd_db_entry_t *entry = &fwd_db->array[fwd_db->index];
*oif = NULL;
*dst_mac = NULL;
/* Verify we haven't run out of space */
if (MAX_DB <= fwd_db->index)
return -1;
/* Mak... |
functions | void resolve_fwd_db(char *intf, int portid, uint8_t *mac)
{
fwd_db_entry_t *entry;
/* Walk the list and attempt to set output and MAC */
for (entry = fwd_db->list; NULL != entry; entry = entry->next) {
if (strcmp(intf, entry->oif))
continue;
entry->oif_id = portid;
memcpy(entry->src_mac.addr, mac, ODPH_ET... |
functions | void dump_fwd_db_entry(fwd_db_entry_t *entry)
{
char subnet_str[MAX_STRING];
char mac_str[MAX_STRING];
mac_addr_str(mac_str, &entry->dst_mac);
printf("%-32s%-32s%-16s\n",
ipv4_subnet_str(subnet_str, &entry->subnet),
entry->oif, mac_str);
} |
functions | void dump_fwd_db(void)
{
fwd_db_entry_t *entry;
printf("Routing table\n"
"-----------------\n"
"%-32s%-32s%-16s\n",
"subnet", "next_hop", "dest_mac");
for (entry = fwd_db->list; NULL != entry; entry = entry->next)
dump_fwd_db_entry(entry);
printf("\n");
} |
defines |
#define TEMP_PCH_REG_ADDR ((0x41 << 1) | I2C_FLAG_BIG_ENDIAN) |
defines | #define TEMP_CHARGER_REG_ADDR ((0x43 << 1) | I2C_FLAG_BIG_ENDIAN) |
defines | #define TEMP_USB_REG_ADDR ((0x46 << 1) | I2C_FLAG_BIG_ENDIAN) |
defines | #define TEMP_HINGE_REG_ADDR ((0x44 << 1) | I2C_FLAG_BIG_ENDIAN) |
defines |
#define TEMP_PCH_ADDR TMP006_ADDR(I2C_PORT_THERMAL, TEMP_PCH_REG_ADDR) |
defines | #define TEMP_CHARGER_ADDR TMP006_ADDR(I2C_PORT_THERMAL, TEMP_CHARGER_REG_ADDR) |
defines | #define TEMP_USB_ADDR TMP006_ADDR(I2C_PORT_THERMAL, TEMP_USB_REG_ADDR) |
defines | #define TEMP_HINGE_ADDR TMP006_ADDR(I2C_PORT_THERMAL, TEMP_HINGE_REG_ADDR) |
includes |
#include <sys/cdefs.h> |
includes |
#include <dev/isci/scil/sci_types.h> |
includes | #include <dev/isci/scil/scif_user_callback.h> |
includes | #include <dev/isci/scil/scic_user_callback.h> |
includes |
#include <dev/isci/scil/scif_sas_controller.h> |
functions | void scic_cb_timer_destroy(
SCI_CONTROLLER_HANDLE_T controller,
void * timer
)
{
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T *)
sci_object_get_association(controller);
if (timer != NULL)
{
scif_cb_timer_destroy(fw_cont... |
functions | void scic_cb_timer_start(
SCI_CONTROLLER_HANDLE_T controller,
void * timer,
U32 milliseconds
)
{
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T *)
sci_object_get_association(controller);
scif_cb_timer_sta... |
functions | void scic_cb_timer_stop(
SCI_CONTROLLER_HANDLE_T controller,
void * timer
)
{
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T *)
sci_object_get_association(controller);
scif_cb_timer_stop(fw_controller, timer);
} |
defines | #define __FUNC__ "dw_surface_ltr" |
functions | int32 dw_surface_ltr( FMField *out, FMField *traction, Mapping *sg )
{
int32 ii, dim, sym, nQP, nFP, ret = RET_OK;
FMField *outQP = 0, *pn = 0, *stn = 0;
nFP = sg->bf->nCol;
nQP = sg->det->nLev;
dim = sg->normal->nRow;
sym = (dim + 1) * dim / 2;
fmf_createAlloc( &outQP, 1, nQP, dim * nFP, 1 );
if (tr... |
functions | else if (traction->nRow == 1) { // Pressure.
fmf_createAlloc( &pn, 1, nQP, dim, 1 );
for (ii = 0; ii < out->nCell; ii++) {
FMF_SetCell( out, ii );
FMF_SetCellX1( traction, ii );
FMF_SetCell( sg->normal, ii );
FMF_SetCell( sg->det, ii );
FMF_SetCellX1( sg->bf, ii );
fmf_mulA... |
functions | else if (traction->nRow == dim) { // Traction vector.
for (ii = 0; ii < out->nCell; ii++) {
FMF_SetCell( out, ii );
FMF_SetCellX1( traction, ii );
FMF_SetCell( sg->normal, ii );
FMF_SetCell( sg->det, ii );
FMF_SetCellX1( sg->bf, ii );
bf_actt( outQP, sg->bf, traction );
f... |
functions | else if (traction->nRow == sym) { // Traction tensor.
fmf_createAlloc( &stn, 1, nQP, dim, 1 );
for (ii = 0; ii < out->nCell; ii++) {
FMF_SetCell( out, ii );
FMF_SetCellX1( traction, ii );
FMF_SetCell( sg->normal, ii );
FMF_SetCell( sg->det, ii );
FMF_SetCellX1( sg->bf, ii );
... |
functions | else if (traction->nCol == sym) {
fmf_freeDestroy( &stn );
} |
includes |
#include <string.h> |
includes |
#include <grpc/support/alloc.h> |
includes | #include <grpc/support/log.h> |
includes | #include <grpc/support/sync.h> |
includes | #include <grpc/support/thd.h> |
functions | void grpc_executor_init() {
memset(&g_executor, 0, sizeof(grpc_executor));
gpr_mu_init(&g_executor.mu);
g_executor.options = gpr_thd_options_default();
gpr_thd_options_set_joinable(&g_executor.options);
} |
functions | void closure_exec_thread_func(void *ignored) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (1) {
gpr_mu_lock(&g_executor.mu);
if (g_executor.shutting_down != 0) {
gpr_mu_unlock(&g_executor.mu);
break;
} |
functions | void maybe_spawn_locked() {
if (grpc_closure_list_empty(g_executor.closures) == 1) {
return;
} |
functions | else if (g_executor.pending_join != 0) {
/* Pickup the remains of the previous incarnations of the thread. */
gpr_thd_join(g_executor.tid);
g_executor.pending_join = 0;
} |
functions | void grpc_executor_enqueue(grpc_closure *closure, int success) {
gpr_mu_lock(&g_executor.mu);
if (g_executor.shutting_down == 0) {
grpc_closure_list_add(&g_executor.closures, closure, success);
maybe_spawn_locked();
} |
functions | void grpc_executor_shutdown() {
int pending_join;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_mu_lock(&g_executor.mu);
pending_join = g_executor.pending_join;
g_executor.shutting_down = 1;
gpr_mu_unlock(&g_executor.mu);
/* we can release the lock at this point despite the access to the closure
* ... |
functions | FLA_Error FLA_Sylv_hh_blk_var17( FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t* cntl )
{
FLA_Obj BTL, BTR, B00, B01, B02,
BBL, BBR, B10, B11, B12,
B20, B21, B22;
FLA_Obj CL, CR, C0, C1, C2;
dim_t b;
FLA_Part_2x2( B, ... |
includes |
#include <stdlib.h> |
defines |
#define lcorolib_c |
defines | #define LUA_LIB |
functions | int auxresume (lua_State *L, lua_State *co, int narg) {
int status;
if (!lua_checkstack(co, narg)) {
lua_pushliteral(L, "too many arguments to resume");
return -1; /* error flag */
} |
functions | int luaB_coresume (lua_State *L) {
lua_State *co = getco(L);
int r;
r = auxresume(L, co, lua_gettop(L) - 1);
if (r < 0) {
lua_pushboolean(L, 0);
lua_insert(L, -2);
return 2; /* return false + error message */
} |
functions | int luaB_auxwrap (lua_State *L) {
lua_State *co = lua_tothread(L, lua_upvalueindex(1));
int r = auxresume(L, co, lua_gettop(L));
if (r < 0) {
if (lua_type(L, -1) == LUA_TSTRING) { /* error object is a string? */
luaL_where(L, 1); /* add extra info */
lua_insert(L, -2);
lua_concat(L, 2);
... |
functions | int luaB_cocreate (lua_State *L) {
lua_State *NL;
luaL_checktype(L, 1, LUA_TFUNCTION);
NL = lua_newthread(L);
lua_pushvalue(L, 1); /* move function to top */
lua_xmove(L, NL, 1); /* move function from L to NL */
return 1;
} |
functions | int luaB_cowrap (lua_State *L) {
luaB_cocreate(L);
lua_pushcclosure(L, luaB_auxwrap, 1);
return 1;
} |
functions | int luaB_yield (lua_State *L) {
return lua_yield(L, lua_gettop(L));
} |
functions | int luaB_costatus (lua_State *L) {
lua_State *co = getco(L);
if (L == co) lua_pushliteral(L, "running");
else {
switch (lua_status(co)) {
case LUA_YIELD:
lua_pushliteral(L, "suspended");
break;
case LUA_OK: {
lua_Debug ar;
if (lua_getstack(co, 0, &ar) > 0) /* does ... |
functions | int luaB_yieldable (lua_State *L) {
lua_pushboolean(L, lua_isyieldable(L));
return 1;
} |
functions | int luaB_corunning (lua_State *L) {
int ismain = lua_pushthread(L);
lua_pushboolean(L, ismain);
return 2;
} |
functions | t_Error CheckParamsGeneratedInternally(t_FmVspEntry *p_FmVspEntry)
{
t_Error err = E_OK;
if ((err = FmSpCheckIntContextParams(&p_FmVspEntry->intContext))!= E_OK)
RETURN_ERROR(MAJOR, err, NO_MSG);
if ((err = FmSpCheckBufMargins(&p_FmVspEntry->bufMargins)) != E_OK)
RETURN_ERROR(MAJOR, err, N... |
functions | t_Error CheckParams(t_FmVspEntry *p_FmVspEntry)
{
t_Error err = E_OK;
SANITY_CHECK_RETURN_ERROR(p_FmVspEntry, E_INVALID_HANDLE);
SANITY_CHECK_RETURN_ERROR(p_FmVspEntry->p_FmVspEntryDriverParams, E_INVALID_HANDLE);
SANITY_CHECK_RETURN_ERROR(p_FmVspEntry->h_Fm, E_INVALID_HANDLE);
if ((err = FmSpChec... |
functions | void FmSpSetBufPoolsInAscOrderOfBufSizes(t_FmExtPools *p_FmExtPools,
uint8_t *orderedArray,
uint16_t *sizesArray)
{
uint16_t bufSize = 0;
int i=0, j=0, k=0;
/* First w... |
functions | t_Error FmSpCheckBufPoolsParams(t_FmExtPools *p_FmExtPools,
t_FmBackupBmPools *p_FmBackupBmPools,
t_FmBufPoolDepletion *p_FmBufPoolDepletion)
{
int i = 0, j = 0;
bool found;
uint8_t count = 0;
if (p_... |
functions | t_Error FmSpCheckIntContextParams(t_FmSpIntContextDataCopy *p_FmSpIntContextDataCopy)
{
/* Check that divisible by 16 and not larger than 240 */
if (p_FmSpIntContextDataCopy->intContextOffset >MAX_INT_OFFSET)
RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("intContext.intContextOffset can't be larger than %d", MA... |
functions | t_Error FmSpCheckBufMargins(t_FmSpBufMargins *p_FmSpBufMargins)
{
/* Check the margin definition */
if (p_FmSpBufMargins->startMargins > MAX_EXT_BUFFER_OFFSET)
RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("bufMargins.startMargins can't be larger than %d", MAX_EXT_BUFFER_OFFSET));
if (p_FmSpBufMargins->endM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.