Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
otp_src_23.3.4.19-erts-symbols.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File otp_src_23.3.4.19-erts-symbols.patch of Package erlang
diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/erl_async.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_async.c --- otp_src_23.3.4.19/erts/emulator/beam/erl_async.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_async.c 2023-08-29 22:38:39.458249015 +0300 @@ -524,6 +524,7 @@ int erts_async_ready_clean(void *varq, v ** The port data gives a fair distribution grom port pointer ** to unsigned integer - to be used in key for driver_async below. */ +__attribute__((externally_visible)) unsigned int driver_async_port_key(ErlDrvPort port) { ErlDrvTermData td = driver_mk_port(port); @@ -547,6 +548,7 @@ unsigned int driver_async_port_key(ErlDr ** async_data data to pass to invoke function ** async_free function for relase async_data in case of failure */ +__attribute__((externally_visible)) long driver_async(ErlDrvPort ix, unsigned int* key, void (*async_invoke)(void*), void* async_data, void (*async_free)(void*)) diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/erl_drv_thread.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_drv_thread.c --- otp_src_23.3.4.19/erts/emulator/beam/erl_drv_thread.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_drv_thread.c 2023-08-29 22:38:39.458249015 +0300 @@ -148,6 +148,7 @@ void erl_drv_thr_init(void) * either the erl_threads.h or the ethread.h interface. */ +__attribute__((externally_visible)) ErlDrvMutex * erl_drv_mutex_create(char *name) { @@ -178,6 +179,7 @@ erl_drv_mutex_create(char *name) return dmtx; } +__attribute__((externally_visible)) void erl_drv_mutex_destroy(ErlDrvMutex *dmtx) { @@ -192,12 +194,14 @@ erl_drv_mutex_destroy(ErlDrvMutex *dmtx) } +__attribute__((externally_visible)) char * erl_drv_mutex_name(ErlDrvMutex *dmtx) { return dmtx ? dmtx->name : NULL; } +__attribute__((externally_visible)) int erl_drv_mutex_trylock(ErlDrvMutex *dmtx) { @@ -214,6 +218,7 @@ erl_drv_mutex_trylock(ErlDrvMutex *dmtx) return res; } +__attribute__((externally_visible)) void erl_drv_mutex_lock(ErlDrvMutex *dmtx) { @@ -231,6 +236,7 @@ erl_drv_mutex_lock(ErlDrvMutex *dmtx) #endif } +__attribute__((externally_visible)) void erl_drv_mutex_unlock(ErlDrvMutex *dmtx) { @@ -245,6 +251,7 @@ erl_drv_mutex_unlock(ErlDrvMutex *dmtx) ethr_mutex_unlock(&dmtx->mtx); } +__attribute__((externally_visible)) ErlDrvCond * erl_drv_cond_create(char *name) { @@ -268,6 +275,7 @@ erl_drv_cond_create(char *name) return dcnd; } +__attribute__((externally_visible)) void erl_drv_cond_destroy(ErlDrvCond *dcnd) { @@ -277,12 +285,14 @@ erl_drv_cond_destroy(ErlDrvCond *dcnd) erts_free(ERTS_ALC_T_DRV_CND, (void *) dcnd); } +__attribute__((externally_visible)) char * erl_drv_cond_name(ErlDrvCond *dcnd) { return dcnd ? dcnd->name : NULL; } +__attribute__((externally_visible)) void erl_drv_cond_signal(ErlDrvCond *dcnd) { @@ -291,6 +301,7 @@ erl_drv_cond_signal(ErlDrvCond *dcnd) ethr_cond_signal(&dcnd->cnd); } +__attribute__((externally_visible)) void erl_drv_cond_broadcast(ErlDrvCond *dcnd) { @@ -300,6 +311,7 @@ erl_drv_cond_broadcast(ErlDrvCond *dcnd) } +__attribute__((externally_visible)) void erl_drv_cond_wait(ErlDrvCond *dcnd, ErlDrvMutex *dmtx) { @@ -321,6 +333,7 @@ erl_drv_cond_wait(ErlDrvCond *dcnd, ErlD } } +__attribute__((externally_visible)) ErlDrvRWLock * erl_drv_rwlock_create(char *name) { @@ -346,6 +359,7 @@ erl_drv_rwlock_create(char *name) return drwlck; } +__attribute__((externally_visible)) void erl_drv_rwlock_destroy(ErlDrvRWLock *drwlck) { @@ -359,12 +373,14 @@ erl_drv_rwlock_destroy(ErlDrvRWLock *drw erts_free(ERTS_ALC_T_DRV_RWLCK, (void *) drwlck); } +__attribute__((externally_visible)) char * erl_drv_rwlock_name(ErlDrvRWLock *drwlck) { return drwlck ? drwlck->name : NULL; } +__attribute__((externally_visible)) int erl_drv_rwlock_tryrlock(ErlDrvRWLock *drwlck) { @@ -378,6 +394,7 @@ erl_drv_rwlock_tryrlock(ErlDrvRWLock *dr return res; } +__attribute__((externally_visible)) void erl_drv_rwlock_rlock(ErlDrvRWLock *drwlck) { @@ -392,6 +409,7 @@ erl_drv_rwlock_rlock(ErlDrvRWLock *drwlc #endif } +__attribute__((externally_visible)) void erl_drv_rwlock_runlock(ErlDrvRWLock *drwlck) { @@ -403,6 +421,7 @@ erl_drv_rwlock_runlock(ErlDrvRWLock *drw ethr_rwmutex_runlock(&drwlck->rwmtx); } +__attribute__((externally_visible)) int erl_drv_rwlock_tryrwlock(ErlDrvRWLock *drwlck) { @@ -416,6 +435,7 @@ erl_drv_rwlock_tryrwlock(ErlDrvRWLock *d return res; } +__attribute__((externally_visible)) void erl_drv_rwlock_rwlock(ErlDrvRWLock *drwlck) { @@ -430,6 +450,7 @@ erl_drv_rwlock_rwlock(ErlDrvRWLock *drwl #endif } +__attribute__((externally_visible)) void erl_drv_rwlock_rwunlock(ErlDrvRWLock *drwlck) { @@ -441,6 +462,7 @@ erl_drv_rwlock_rwunlock(ErlDrvRWLock *dr ethr_rwmutex_rwunlock(&drwlck->rwmtx); } +__attribute__((externally_visible)) int erl_drv_tsd_key_create(char *name, ErlDrvTSDKey *key) { @@ -513,6 +535,7 @@ erl_drv_tsd_key_create(char *name, ErlDr return res; } +__attribute__((externally_visible)) void erl_drv_tsd_key_destroy(ErlDrvTSDKey key) { @@ -535,6 +558,7 @@ erl_drv_tsd_key_destroy(ErlDrvTSDKey key #define ERL_DRV_TSD__ (dtid->tsd) #define ERL_DRV_TSD_LEN__ (dtid->tsd_len) +__attribute__((externally_visible)) void erl_drv_tsd_set(ErlDrvTSDKey key, void *data) { @@ -563,6 +587,7 @@ erl_drv_tsd_set(ErlDrvTSDKey key, void * ERL_DRV_TSD__[key] = data; } +__attribute__((externally_visible)) void * erl_drv_tsd_get(ErlDrvTSDKey key) { @@ -579,6 +604,7 @@ erl_drv_tsd_get(ErlDrvTSDKey key) #undef ERL_DRV_TSD_LEN__ #undef ERL_DRV_TSD__ +__attribute__((externally_visible)) ErlDrvThreadOpts * erl_drv_thread_opts_create(char *name) { @@ -590,6 +616,7 @@ erl_drv_thread_opts_create(char *name) return opts; } +__attribute__((externally_visible)) void erl_drv_thread_opts_destroy(ErlDrvThreadOpts *opts) { @@ -598,6 +625,7 @@ erl_drv_thread_opts_destroy(ErlDrvThread erts_free(ERTS_ALC_T_DRV_THR_OPTS, opts); } +__attribute__((externally_visible)) int erl_drv_thread_create(char *name, ErlDrvTid *tid, @@ -648,6 +676,7 @@ erl_drv_thread_create(char *name, return 0; } +__attribute__((externally_visible)) char * erl_drv_thread_name(ErlDrvTid tid) { @@ -656,6 +685,7 @@ erl_drv_thread_name(ErlDrvTid tid) } +__attribute__((externally_visible)) ErlDrvTid erl_drv_thread_self(void) { @@ -679,6 +709,7 @@ erl_drv_thread_self(void) return (ErlDrvTid) dtid; } +__attribute__((externally_visible)) int erl_drv_equal_tids(ErlDrvTid tid1, ErlDrvTid tid2) { @@ -697,6 +728,7 @@ erl_drv_equal_tids(ErlDrvTid tid1, ErlDr return res; } +__attribute__((externally_visible)) void erl_drv_thread_exit(void *res) { @@ -708,6 +740,7 @@ erl_drv_thread_exit(void *res) fatal_error(EACCES, "erl_drv_thread_exit()"); } +__attribute__((externally_visible)) int erl_drv_thread_join(ErlDrvTid tid, void **respp) { diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/erl_init.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_init.c --- otp_src_23.3.4.19/erts/emulator/beam/erl_init.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_init.c 2023-08-29 22:41:09.871094993 +0300 @@ -2494,6 +2494,7 @@ __decl_noreturn void __noreturn erts_exi } /* Exit without flushing async threads */ +__attribute__((externally_visible)) __decl_noreturn void __noreturn erts_exit(int n, char *fmt, ...) { va_list args1, args2; @@ -2505,6 +2506,7 @@ __decl_noreturn void __noreturn erts_exi } /* Exit after flushing async threads */ +__attribute__((externally_visible)) __decl_noreturn void __noreturn erts_flush_async_exit(int n, char *fmt, ...) { va_list args1, args2; diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/erl_nif.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_nif.c --- otp_src_23.3.4.19/erts/emulator/beam/erl_nif.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_nif.c 2023-08-29 22:38:39.462248930 +0300 @@ -519,21 +519,25 @@ static void cache_env(ErlNifEnv* env) } } +__attribute__((externally_visible)) void* enif_priv_data(ErlNifEnv* env) { return env->mod_nif->priv_data; } +__attribute__((externally_visible)) void* enif_alloc(size_t size) { return erts_alloc_fnf(ERTS_ALC_T_NIF, (Uint) size); } +__attribute__((externally_visible)) void* enif_realloc(void* ptr, size_t size) { return erts_realloc_fnf(ERTS_ALC_T_NIF, ptr, size); } +__attribute__((externally_visible)) void enif_free(void* ptr) { erts_free(ERTS_ALC_T_NIF, ptr); @@ -577,6 +581,7 @@ setup_nif_env(struct enif_msg_environmen #endif } +__attribute__((externally_visible)) ErlNifEnv* enif_alloc_env(void) { struct enif_msg_environment_t* msg_env = @@ -584,6 +589,7 @@ ErlNifEnv* enif_alloc_env(void) setup_nif_env(msg_env, NULL, NULL); return &msg_env->env; } +__attribute__((externally_visible)) void enif_free_env(ErlNifEnv* env) { enif_clear_env(env); @@ -610,6 +616,7 @@ static ERTS_INLINE void clear_offheap(Er oh->overhead = 0; } +__attribute__((externally_visible)) void enif_clear_env(ErlNifEnv* env) { struct enif_msg_environment_t* menv = (struct enif_msg_environment_t*)env; @@ -761,6 +768,7 @@ static ERTS_INLINE ERL_NIF_TERM make_cop return copy_struct(src_term, sz, &hp, &MSO(dst_env->proc)); } +__attribute__((externally_visible)) int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid, ErlNifEnv* msg_env, ERL_NIF_TERM msg) { @@ -988,6 +996,7 @@ done: return 1; } +__attribute__((externally_visible)) int enif_port_command(ErlNifEnv *env, const ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg) @@ -1062,6 +1071,7 @@ static Eterm call_whereis(ErlNifEnv *env return res; } +__attribute__((externally_visible)) int enif_whereis_pid(ErlNifEnv *env, ERL_NIF_TERM name, ErlNifPid *pid) { Eterm res; @@ -1074,6 +1084,7 @@ int enif_whereis_pid(ErlNifEnv *env, ERL return enif_get_local_pid(env, res, pid); } +__attribute__((externally_visible)) int enif_whereis_port(ErlNifEnv *env, ERL_NIF_TERM name, ErlNifPort *port) { Eterm res; @@ -1086,6 +1097,7 @@ int enif_whereis_port(ErlNifEnv *env, ER return enif_get_local_port(env, res, port); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_copy(ErlNifEnv* dst_env, ERL_NIF_TERM src_term) { return make_copy(dst_env, src_term, NULL); @@ -1098,6 +1110,7 @@ static int is_offheap(const ErlOffHeap* } #endif +__attribute__((externally_visible)) ErlNifPid* enif_self(ErlNifEnv* caller_env, ErlNifPid* pid) { if (caller_env->proc->common.id == ERTS_INVALID_PID) @@ -1106,6 +1119,7 @@ ErlNifPid* enif_self(ErlNifEnv* caller_e return pid; } +__attribute__((externally_visible)) int enif_get_local_pid(ErlNifEnv* env, ERL_NIF_TERM term, ErlNifPid* pid) { if (is_internal_pid(term)) { @@ -1115,17 +1129,20 @@ int enif_get_local_pid(ErlNifEnv* env, E return 0; } +__attribute__((externally_visible)) void enif_set_pid_undefined(ErlNifPid* pid) { pid->pid = am_undefined; } +__attribute__((externally_visible)) int enif_is_pid_undefined(const ErlNifPid* pid) { ASSERT(pid->pid == am_undefined || is_internal_pid(pid->pid)); return pid->pid == am_undefined; } +__attribute__((externally_visible)) int enif_get_local_port(ErlNifEnv* env, ERL_NIF_TERM term, ErlNifPort* port) { if (is_internal_port(term)) { @@ -1135,61 +1152,73 @@ int enif_get_local_port(ErlNifEnv* env, return 0; } +__attribute__((externally_visible)) int enif_is_atom(ErlNifEnv* env, ERL_NIF_TERM term) { return is_atom(term); } +__attribute__((externally_visible)) int enif_is_binary(ErlNifEnv* env, ERL_NIF_TERM term) { return is_binary(term) && (binary_bitsize(term) % 8 == 0); } +__attribute__((externally_visible)) int enif_is_empty_list(ErlNifEnv* env, ERL_NIF_TERM term) { return is_nil(term); } +__attribute__((externally_visible)) int enif_is_fun(ErlNifEnv* env, ERL_NIF_TERM term) { return is_fun(term); } +__attribute__((externally_visible)) int enif_is_pid(ErlNifEnv* env, ERL_NIF_TERM term) { return is_pid(term); } +__attribute__((externally_visible)) int enif_is_port(ErlNifEnv* env, ERL_NIF_TERM term) { return is_port(term); } +__attribute__((externally_visible)) int enif_is_ref(ErlNifEnv* env, ERL_NIF_TERM term) { return is_ref(term); } +__attribute__((externally_visible)) int enif_is_tuple(ErlNifEnv* env, ERL_NIF_TERM term) { return is_tuple(term); } +__attribute__((externally_visible)) int enif_is_list(ErlNifEnv* env, ERL_NIF_TERM term) { return is_list(term) || is_nil(term); } +__attribute__((externally_visible)) int enif_is_exception(ErlNifEnv* env, ERL_NIF_TERM term) { return env->exception_thrown && term == THE_NON_VALUE; } +__attribute__((externally_visible)) int enif_is_number(ErlNifEnv* env, ERL_NIF_TERM term) { return is_number(term); } +__attribute__((externally_visible)) ErlNifTermType enif_term_type(ErlNifEnv* env, ERL_NIF_TERM term) { (void)env; @@ -1236,6 +1265,7 @@ static void aligned_binary_dtor(struct e erts_free_aligned_binary_bytes_extra((byte*)obj, obj->allocator); } +__attribute__((externally_visible)) int enif_inspect_binary(ErlNifEnv* env, Eterm bin_term, ErlNifBinary* bin) { ErtsAlcType_t allocator = is_proc_bound(env) ? ERTS_ALC_T_TMP : ERTS_ALC_T_NIF; @@ -1271,6 +1301,7 @@ int enif_inspect_binary(ErlNifEnv* env, return 1; } +__attribute__((externally_visible)) int enif_inspect_iolist_as_binary(ErlNifEnv* env, Eterm term, ErlNifBinary* bin) { ErlDrvSizeT sz; @@ -1295,6 +1326,7 @@ int enif_inspect_iolist_as_binary(ErlNif return 1; } +__attribute__((externally_visible)) int enif_alloc_binary(size_t size, ErlNifBinary* bin) { Binary* refbin; @@ -1310,6 +1342,7 @@ int enif_alloc_binary(size_t size, ErlNi return 1; } +__attribute__((externally_visible)) int enif_realloc_binary(ErlNifBinary* bin, size_t size) { if (bin->ref_bin != NULL) { @@ -1335,6 +1368,7 @@ int enif_realloc_binary(ErlNifBinary* bi } +__attribute__((externally_visible)) void enif_release_binary(ErlNifBinary* bin) { if (bin->ref_bin != NULL) { @@ -1347,6 +1381,7 @@ void enif_release_binary(ErlNifBinary* b #endif } +__attribute__((externally_visible)) unsigned char* enif_make_new_binary(ErlNifEnv* env, size_t size, ERL_NIF_TERM* termp) { @@ -1356,6 +1391,7 @@ unsigned char* enif_make_new_binary(ErlN return binary_bytes(*termp); } +__attribute__((externally_visible)) int enif_term_to_binary(ErlNifEnv *dst_env, ERL_NIF_TERM term, ErlNifBinary *bin) { @@ -1388,6 +1424,7 @@ int enif_term_to_binary(ErlNifEnv *dst_e return 1; } +__attribute__((externally_visible)) size_t enif_binary_to_term(ErlNifEnv *dst_env, const unsigned char* data, size_t data_sz, @@ -1428,11 +1465,13 @@ size_t enif_binary_to_term(ErlNifEnv *ds return bp - data; } +__attribute__((externally_visible)) int enif_is_identical(Eterm lhs, Eterm rhs) { return EQ(lhs,rhs); } +__attribute__((externally_visible)) int enif_compare(Eterm lhs, Eterm rhs) { Sint result = CMP(lhs,rhs); @@ -1446,6 +1485,7 @@ int enif_compare(Eterm lhs, Eterm rhs) return result; } +__attribute__((externally_visible)) ErlNifUInt64 enif_hash(ErlNifHash type, Eterm term, ErlNifUInt64 salt) { switch (type) { @@ -1462,6 +1502,7 @@ ErlNifUInt64 enif_hash(ErlNifHash type, } } +__attribute__((externally_visible)) int enif_get_tuple(ErlNifEnv* env, Eterm tpl, int* arity, const Eterm** array) { Eterm* ptr; @@ -1474,6 +1515,7 @@ int enif_get_tuple(ErlNifEnv* env, Eterm return 1; } +__attribute__((externally_visible)) int enif_get_string(ErlNifEnv *env, ERL_NIF_TERM list, char* buf, unsigned len, ErlNifCharEncoding encoding) { @@ -1506,6 +1548,7 @@ int enif_get_string(ErlNifEnv *env, ERL_ return n + 1; } +__attribute__((externally_visible)) Eterm enif_make_binary(ErlNifEnv* env, ErlNifBinary* bin) { Eterm bin_term; @@ -1555,6 +1598,7 @@ Eterm enif_make_binary(ErlNifEnv* env, E return bin_term; } +__attribute__((externally_visible)) Eterm enif_make_sub_binary(ErlNifEnv* env, ERL_NIF_TERM bin_term, size_t pos, size_t size) { @@ -1583,11 +1627,13 @@ Eterm enif_make_sub_binary(ErlNifEnv* en } +__attribute__((externally_visible)) Eterm enif_make_badarg(ErlNifEnv* env) { return enif_raise_exception(env, am_badarg); } +__attribute__((externally_visible)) Eterm enif_raise_exception(ErlNifEnv* env, ERL_NIF_TERM reason) { env->exception_thrown = 1; @@ -1595,6 +1641,7 @@ Eterm enif_raise_exception(ErlNifEnv* en BIF_ERROR(env->proc, EXC_ERROR); } +__attribute__((externally_visible)) int enif_has_pending_exception(ErlNifEnv* env, ERL_NIF_TERM* reason) { if (env->exception_thrown && reason != NULL) @@ -1602,6 +1649,7 @@ int enif_has_pending_exception(ErlNifEnv return env->exception_thrown; } +__attribute__((externally_visible)) int enif_get_atom(ErlNifEnv* env, Eterm atom, char* buf, unsigned len, ErlNifCharEncoding encoding) { @@ -1626,6 +1674,7 @@ int enif_get_atom(ErlNifEnv* env, Eterm return ap->latin1_chars + 1; } +__attribute__((externally_visible)) int enif_get_int(ErlNifEnv* env, Eterm term, int* ip) { #if SIZEOF_INT == ERTS_SIZEOF_ETERM @@ -1643,6 +1692,7 @@ int enif_get_int(ErlNifEnv* env, Eterm t #endif } +__attribute__((externally_visible)) int enif_get_uint(ErlNifEnv* env, Eterm term, unsigned* ip) { #if SIZEOF_INT == ERTS_SIZEOF_ETERM @@ -1658,6 +1708,7 @@ int enif_get_uint(ErlNifEnv* env, Eterm #endif } +__attribute__((externally_visible)) int enif_get_long(ErlNifEnv* env, Eterm term, long* ip) { #if SIZEOF_LONG == ERTS_SIZEOF_ETERM @@ -1676,6 +1727,7 @@ int enif_get_long(ErlNifEnv* env, Eterm #endif } +__attribute__((externally_visible)) int enif_get_ulong(ErlNifEnv* env, Eterm term, unsigned long* ip) { #if SIZEOF_LONG == ERTS_SIZEOF_ETERM @@ -1696,17 +1748,20 @@ int enif_get_ulong(ErlNifEnv* env, Eterm } #if HAVE_INT64 && SIZEOF_LONG != 8 +__attribute__((externally_visible)) int enif_get_int64(ErlNifEnv* env, ERL_NIF_TERM term, ErlNifSInt64* ip) { return term_to_Sint64(term, ip); } +__attribute__((externally_visible)) int enif_get_uint64(ErlNifEnv* env, ERL_NIF_TERM term, ErlNifUInt64* ip) { return term_to_Uint64(term, ip); } #endif /* HAVE_INT64 && SIZEOF_LONG != 8 */ +__attribute__((externally_visible)) int enif_get_double(ErlNifEnv* env, ERL_NIF_TERM term, double* dp) { FloatDef f; @@ -1718,6 +1773,7 @@ int enif_get_double(ErlNifEnv* env, ERL_ return 1; } +__attribute__((externally_visible)) int enif_get_atom_length(ErlNifEnv* env, Eterm atom, unsigned* len, ErlNifCharEncoding enc) { @@ -1732,6 +1788,7 @@ int enif_get_atom_length(ErlNifEnv* env, return 1; } +__attribute__((externally_visible)) int enif_get_list_cell(ErlNifEnv* env, Eterm term, Eterm* head, Eterm* tail) { Eterm* val; @@ -1742,6 +1799,7 @@ int enif_get_list_cell(ErlNifEnv* env, E return 1; } +__attribute__((externally_visible)) int enif_get_list_length(ErlNifEnv* env, Eterm term, unsigned* len) { Sint i; @@ -1754,6 +1812,7 @@ int enif_get_list_length(ErlNifEnv* env, return 1; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_int(ErlNifEnv* env, int i) { #if SIZEOF_INT == ERTS_SIZEOF_ETERM @@ -1764,6 +1823,7 @@ ERL_NIF_TERM enif_make_int(ErlNifEnv* en #endif } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_uint(ErlNifEnv* env, unsigned i) { #if SIZEOF_INT == ERTS_SIZEOF_ETERM @@ -1774,6 +1834,7 @@ ERL_NIF_TERM enif_make_uint(ErlNifEnv* e #endif } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_long(ErlNifEnv* env, long i) { #if SIZEOF_LONG < ERTS_SIZEOF_ETERM @@ -1793,6 +1854,7 @@ ERL_NIF_TERM enif_make_long(ErlNifEnv* e #endif } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_ulong(ErlNifEnv* env, unsigned long i) { if (IS_USMALL(0,i)) { @@ -1809,6 +1871,7 @@ ERL_NIF_TERM enif_make_ulong(ErlNifEnv* } #if HAVE_INT64 && SIZEOF_LONG != 8 +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_int64(ErlNifEnv* env, ErlNifSInt64 i) { Uint* hp; @@ -1818,6 +1881,7 @@ ERL_NIF_TERM enif_make_int64(ErlNifEnv* return erts_bld_sint64(&hp, NULL, i); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_uint64(ErlNifEnv* env, ErlNifUInt64 i) { Uint* hp; @@ -1828,6 +1892,7 @@ ERL_NIF_TERM enif_make_uint64(ErlNifEnv* } #endif /* HAVE_INT64 && SIZEOF_LONG != 8 */ +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_double(ErlNifEnv* env, double d) { Eterm* hp; @@ -1841,11 +1906,13 @@ ERL_NIF_TERM enif_make_double(ErlNifEnv* return make_float(hp); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_atom(ErlNifEnv* env, const char* name) { return enif_make_atom_len(env, name, sys_strlen(name)); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_atom_len(ErlNifEnv* env, const char* name, size_t len) { if (len > MAX_ATOM_CHARACTERS) @@ -1853,12 +1920,14 @@ ERL_NIF_TERM enif_make_atom_len(ErlNifEn return erts_atom_put((byte*)name, len, ERTS_ATOM_ENC_LATIN1, 1); } +__attribute__((externally_visible)) int enif_make_existing_atom(ErlNifEnv* env, const char* name, ERL_NIF_TERM* atom, ErlNifCharEncoding enc) { return enif_make_existing_atom_len(env, name, sys_strlen(name), atom, enc); } +__attribute__((externally_visible)) int enif_make_existing_atom_len(ErlNifEnv* env, const char* name, size_t len, ERL_NIF_TERM* atom, ErlNifCharEncoding encoding) { @@ -1868,6 +1937,7 @@ int enif_make_existing_atom_len(ErlNifEn return erts_atom_get(name, len, atom, ERTS_ATOM_ENC_LATIN1); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_tuple(ErlNifEnv* env, unsigned cnt, ...) { #ifdef ERTS_NIF_ASSERT_IN_ENV @@ -1888,6 +1958,7 @@ ERL_NIF_TERM enif_make_tuple(ErlNifEnv* return ret; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_tuple_from_array(ErlNifEnv* env, const ERL_NIF_TERM arr[], unsigned cnt) { #ifdef ERTS_NIF_ASSERT_IN_ENV @@ -1905,6 +1976,7 @@ ERL_NIF_TERM enif_make_tuple_from_array( return ret; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_list_cell(ErlNifEnv* env, Eterm car, Eterm cdr) { Eterm* hp = alloc_heap(env,2); @@ -1917,6 +1989,7 @@ ERL_NIF_TERM enif_make_list_cell(ErlNifE return ret; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_list(ErlNifEnv* env, unsigned cnt, ...) { if (cnt == 0) { @@ -1946,6 +2019,7 @@ ERL_NIF_TERM enif_make_list(ErlNifEnv* e } } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_list_from_array(ErlNifEnv* env, const ERL_NIF_TERM arr[], unsigned cnt) { #ifdef ERTS_NIF_ASSERT_IN_ENV @@ -1968,12 +2042,14 @@ ERL_NIF_TERM enif_make_list_from_array(E return ret; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_string(ErlNifEnv* env, const char* string, ErlNifCharEncoding encoding) { return enif_make_string_len(env, string, sys_strlen(string), encoding); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_string_len(ErlNifEnv* env, const char* string, size_t len, ErlNifCharEncoding encoding) { @@ -1982,17 +2058,20 @@ ERL_NIF_TERM enif_make_string_len(ErlNif return erts_bld_string_n(&hp,NULL,string,len); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_ref(ErlNifEnv* env) { Eterm* hp = alloc_heap(env, ERTS_REF_THING_SIZE); return erts_make_ref_in_buffer(hp); } +__attribute__((externally_visible)) void enif_system_info(ErlNifSysInfo *sip, size_t si_size) { driver_system_info(sip, si_size); } +__attribute__((externally_visible)) int enif_make_reverse_list(ErlNifEnv* env, ERL_NIF_TERM term, ERL_NIF_TERM *list) { Eterm *listptr, ret, *hp; @@ -2012,6 +2091,7 @@ int enif_make_reverse_list(ErlNifEnv* en return 1; } +__attribute__((externally_visible)) int enif_is_current_process_alive(ErlNifEnv* env) { Process *c_p; @@ -2031,6 +2111,7 @@ int enif_is_current_process_alive(ErlNif return !ERTS_PROC_IS_EXITING(c_p); } +__attribute__((externally_visible)) int enif_is_process_alive(ErlNifEnv* env, ErlNifPid *proc) { int scheduler; @@ -2048,6 +2129,7 @@ int enif_is_process_alive(ErlNifEnv* env } } +__attribute__((externally_visible)) int enif_is_port_alive(ErlNifEnv *env, ErlNifPort *port) { int scheduler; @@ -2067,6 +2149,7 @@ int enif_is_port_alive(ErlNifEnv *env, E } } +__attribute__((externally_visible)) ERL_NIF_TERM enif_now_time(ErlNifEnv *env) { @@ -2077,6 +2160,7 @@ enif_now_time(ErlNifEnv *env) return TUPLE3(hp, make_small(mega), make_small(sec), make_small(micro)); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_cpu_time(ErlNifEnv *env) { @@ -2091,6 +2175,7 @@ enif_cpu_time(ErlNifEnv *env) #endif } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_unique_integer(ErlNifEnv *env, ErlNifUniqueInteger properties) { @@ -2113,56 +2198,93 @@ enif_make_unique_integer(ErlNifEnv *env, } } +__attribute__((externally_visible)) ErlNifMutex* enif_mutex_create(char *name) { return erl_drv_mutex_create(name); } +__attribute__((externally_visible)) void enif_mutex_destroy(ErlNifMutex *mtx) { erl_drv_mutex_destroy(mtx); } +__attribute__((externally_visible)) int enif_mutex_trylock(ErlNifMutex *mtx) { return erl_drv_mutex_trylock(mtx); } +__attribute__((externally_visible)) void enif_mutex_lock(ErlNifMutex *mtx) { erl_drv_mutex_lock(mtx); } +__attribute__((externally_visible)) void enif_mutex_unlock(ErlNifMutex *mtx) { erl_drv_mutex_unlock(mtx); } +__attribute__((externally_visible)) ErlNifCond* enif_cond_create(char *name) { return erl_drv_cond_create(name); } +__attribute__((externally_visible)) void enif_cond_destroy(ErlNifCond *cnd) { erl_drv_cond_destroy(cnd); } +__attribute__((externally_visible)) void enif_cond_signal(ErlNifCond *cnd) { erl_drv_cond_signal(cnd); } +__attribute__((externally_visible)) void enif_cond_broadcast(ErlNifCond *cnd) { erl_drv_cond_broadcast(cnd); } +__attribute__((externally_visible)) void enif_cond_wait(ErlNifCond *cnd, ErlNifMutex *mtx) { erl_drv_cond_wait(cnd,mtx); } +__attribute__((externally_visible)) ErlNifRWLock* enif_rwlock_create(char *name) { return erl_drv_rwlock_create(name); } +__attribute__((externally_visible)) void enif_rwlock_destroy(ErlNifRWLock *rwlck) { erl_drv_rwlock_destroy(rwlck); } +__attribute__((externally_visible)) int enif_rwlock_tryrlock(ErlNifRWLock *rwlck) { return erl_drv_rwlock_tryrlock(rwlck); } +__attribute__((externally_visible)) void enif_rwlock_rlock(ErlNifRWLock *rwlck) { erl_drv_rwlock_rlock(rwlck); } +__attribute__((externally_visible)) void enif_rwlock_runlock(ErlNifRWLock *rwlck) { erl_drv_rwlock_runlock(rwlck); } +__attribute__((externally_visible)) int enif_rwlock_tryrwlock(ErlNifRWLock *rwlck) { return erl_drv_rwlock_tryrwlock(rwlck); } +__attribute__((externally_visible)) void enif_rwlock_rwlock(ErlNifRWLock *rwlck) { erl_drv_rwlock_rwlock(rwlck); } +__attribute__((externally_visible)) void enif_rwlock_rwunlock(ErlNifRWLock *rwlck) { erl_drv_rwlock_rwunlock(rwlck); } +__attribute__((externally_visible)) int enif_tsd_key_create(char *name, ErlNifTSDKey *key) { return erl_drv_tsd_key_create(name,key); } +__attribute__((externally_visible)) void enif_tsd_key_destroy(ErlNifTSDKey key) { erl_drv_tsd_key_destroy(key); } +__attribute__((externally_visible)) void enif_tsd_set(ErlNifTSDKey key, void *data) { erl_drv_tsd_set(key,data); } +__attribute__((externally_visible)) void* enif_tsd_get(ErlNifTSDKey key) { return erl_drv_tsd_get(key); } +__attribute__((externally_visible)) ErlNifThreadOpts* enif_thread_opts_create(char *name) { return (ErlNifThreadOpts*) erl_drv_thread_opts_create(name); } +__attribute__((externally_visible)) void enif_thread_opts_destroy(ErlNifThreadOpts *opts) { erl_drv_thread_opts_destroy((ErlDrvThreadOpts*)opts); } +__attribute__((externally_visible)) int enif_thread_create(char *name, ErlNifTid *tid, void* (*func)(void *), void *args, ErlNifThreadOpts *opts) { return erl_drv_thread_create(name,tid,func,args,(ErlDrvThreadOpts*)opts); } +__attribute__((externally_visible)) ErlNifTid enif_thread_self(void) { return erl_drv_thread_self(); } +__attribute__((externally_visible)) int enif_equal_tids(ErlNifTid tid1, ErlNifTid tid2) { return erl_drv_equal_tids(tid1,tid2); } +__attribute__((externally_visible)) void enif_thread_exit(void *resp) { erl_drv_thread_exit(resp); } +__attribute__((externally_visible)) int enif_thread_join(ErlNifTid tid, void **respp) { return erl_drv_thread_join(tid,respp); } +__attribute__((externally_visible)) char* enif_mutex_name(ErlNifMutex *mtx) {return erl_drv_mutex_name(mtx); } +__attribute__((externally_visible)) char* enif_cond_name(ErlNifCond *cnd) { return erl_drv_cond_name(cnd); } +__attribute__((externally_visible)) char* enif_rwlock_name(ErlNifRWLock* rwlck) { return erl_drv_rwlock_name(rwlck); } +__attribute__((externally_visible)) char* enif_thread_name(ErlNifTid tid) { return erl_drv_thread_name(tid); } +__attribute__((externally_visible)) int enif_getenv(const char *key, char *value, size_t *value_size) { return erl_drv_getenv(key, value, value_size); } +__attribute__((externally_visible)) ErlNifTime enif_monotonic_time(ErlNifTimeUnit time_unit) { return (ErlNifTime) erts_napi_monotonic_time((int) time_unit); } +__attribute__((externally_visible)) ErlNifTime enif_time_offset(ErlNifTimeUnit time_unit) { return (ErlNifTime) erts_napi_time_offset((int) time_unit); } +__attribute__((externally_visible)) ErlNifTime enif_convert_time_unit(ErlNifTime val, ErlNifTimeUnit from, @@ -2173,6 +2295,7 @@ enif_convert_time_unit(ErlNifTime val, (int) to); } +__attribute__((externally_visible)) int enif_fprintf(FILE* filep, const char* format, ...) { int ret; @@ -2183,11 +2306,13 @@ int enif_fprintf(FILE* filep, const char return ret; } +__attribute__((externally_visible)) int enif_vfprintf(FILE* filep, const char *format, va_list ap) { return erts_vfprintf(filep, format, ap); } +__attribute__((externally_visible)) int enif_snprintf(char *buffer, size_t size, const char* format, ...) { int ret; @@ -2198,6 +2323,7 @@ int enif_snprintf(char *buffer, size_t s return ret; } +__attribute__((externally_visible)) int enif_vsnprintf(char* buffer, size_t size, const char *format, va_list ap) { return erts_vsnprintf(buffer, size, format, ap); @@ -2395,6 +2521,7 @@ ErlNifResourceType* open_resource_type(E return type; } +__attribute__((externally_visible)) ErlNifResourceType* enif_open_resource_type(ErlNifEnv* env, const char* module_str, @@ -2409,6 +2536,7 @@ enif_open_resource_type(ErlNifEnv* env, sizeof(init)); } +__attribute__((externally_visible)) ErlNifResourceType* enif_open_resource_type_x(ErlNifEnv* env, const char* name_str, @@ -2730,6 +2858,7 @@ void erts_fire_nif_monitor(ErtsMonitor * } } +__attribute__((externally_visible)) void* enif_alloc_resource(ErlNifResourceType* type, size_t data_sz) { size_t magic_sz = offsetof(ErtsResource,data); @@ -2773,6 +2902,7 @@ void* enif_alloc_resource(ErlNifResource return resource->data; } +__attribute__((externally_visible)) void enif_release_resource(void* obj) { ErtsResource* resource = DATA_TO_RESOURCE(obj); @@ -2786,6 +2916,7 @@ void enif_release_resource(void* obj) erts_bin_release(&bin->binary); } +__attribute__((externally_visible)) void enif_keep_resource(void* obj) { ErtsResource* resource = DATA_TO_RESOURCE(obj); @@ -2806,6 +2937,7 @@ Eterm erts_bld_resource_ref(Eterm** hpp, return erts_mk_magic_ref(hpp, oh, &bin->binary); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_resource(ErlNifEnv* env, void* obj) { ErtsResource* resource = DATA_TO_RESOURCE(obj); @@ -2815,6 +2947,7 @@ ERL_NIF_TERM enif_make_resource(ErlNifEn return erts_mk_magic_ref(&hp, &MSO(env->proc), &bin->binary); } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_resource_binary(ErlNifEnv* env, void* obj, const void* data, size_t size) { @@ -2838,6 +2971,7 @@ ERL_NIF_TERM enif_make_resource_binary(E return make_binary(hp); } +__attribute__((externally_visible)) int enif_get_resource(ErlNifEnv* env, ERL_NIF_TERM term, ErlNifResourceType* type, void** objp) { @@ -2870,6 +3004,7 @@ int enif_get_resource(ErlNifEnv* env, ER return 1; } +__attribute__((externally_visible)) size_t enif_sizeof_resource(void* obj) { ErtsResource* resource = DATA_TO_RESOURCE(obj); @@ -2883,6 +3018,7 @@ size_t enif_sizeof_resource(void* obj) } +__attribute__((externally_visible)) void* enif_dlopen(const char* lib, void (*err_handler)(void*,const char*), void* err_arg) { @@ -2904,6 +3040,7 @@ void* enif_dlopen(const char* lib, return handle; } +__attribute__((externally_visible)) void* enif_dlsym(void* handle, const char* symbol, void (*err_handler)(void*,const char*), void* err_arg) { @@ -2919,6 +3056,7 @@ void* enif_dlsym(void* handle, const cha return ret; } +__attribute__((externally_visible)) int enif_consume_timeslice(ErlNifEnv* env, int percent) { Process *proc; @@ -3143,6 +3281,7 @@ execute_nif(ErlNifEnv* env, int argc, co return result; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_schedule_nif(ErlNifEnv* env, const char* fun_name, int flags, ERL_NIF_TERM (*fp)(ErlNifEnv*, int, const ERL_NIF_TERM[]), @@ -3180,6 +3319,7 @@ enif_schedule_nif(ErlNifEnv* env, const return result; } +__attribute__((externally_visible)) int enif_thread_type(void) { @@ -3203,11 +3343,13 @@ enif_thread_type(void) /* Maps */ +__attribute__((externally_visible)) int enif_is_map(ErlNifEnv* env, ERL_NIF_TERM term) { return is_map(term); } +__attribute__((externally_visible)) int enif_get_map_size(ErlNifEnv* env, ERL_NIF_TERM term, size_t *size) { if (is_flatmap(term)) { @@ -3223,6 +3365,7 @@ int enif_get_map_size(ErlNifEnv* env, ER return 0; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_new_map(ErlNifEnv* env) { Eterm* hp = alloc_heap(env,MAP_HEADER_FLATMAP_SZ+1); @@ -3239,6 +3382,7 @@ ERL_NIF_TERM enif_make_new_map(ErlNifEnv return make_flatmap(mp); } +__attribute__((externally_visible)) int enif_make_map_from_arrays(ErlNifEnv *env, ERL_NIF_TERM keys[], ERL_NIF_TERM values[], @@ -3277,6 +3421,7 @@ int enif_make_map_from_arrays(ErlNifEnv return succeeded; } +__attribute__((externally_visible)) int enif_make_map_put(ErlNifEnv* env, Eterm map_in, Eterm key, @@ -3296,6 +3441,7 @@ int enif_make_map_put(ErlNifEnv* env, return 1; } +__attribute__((externally_visible)) int enif_get_map_value(ErlNifEnv* env, Eterm map, Eterm key, @@ -3313,6 +3459,7 @@ int enif_get_map_value(ErlNifEnv* env, return 0; } +__attribute__((externally_visible)) int enif_make_map_update(ErlNifEnv* env, Eterm map_in, Eterm key, @@ -3334,6 +3481,7 @@ int enif_make_map_update(ErlNifEnv* env, return res; } +__attribute__((externally_visible)) int enif_make_map_remove(ErlNifEnv* env, Eterm map_in, Eterm key, @@ -3348,6 +3496,7 @@ int enif_make_map_remove(ErlNifEnv* env, return 1; } +__attribute__((externally_visible)) int enif_map_iterator_create(ErlNifEnv *env, Eterm map, ErlNifMapIterator *iter, @@ -3406,6 +3555,7 @@ error: return 0; } +__attribute__((externally_visible)) void enif_map_iterator_destroy(ErlNifEnv *env, ErlNifMapIterator *iter) { if (is_hashmap(iter->map)) { @@ -3420,6 +3570,7 @@ void enif_map_iterator_destroy(ErlNifEnv #endif } +__attribute__((externally_visible)) int enif_map_iterator_is_tail(ErlNifEnv *env, ErlNifMapIterator *iter) { ASSERT(iter); @@ -3434,6 +3585,7 @@ int enif_map_iterator_is_tail(ErlNifEnv } } +__attribute__((externally_visible)) int enif_map_iterator_is_head(ErlNifEnv *env, ErlNifMapIterator *iter) { ASSERT(iter); @@ -3449,6 +3601,7 @@ int enif_map_iterator_is_head(ErlNifEnv } +__attribute__((externally_visible)) int enif_map_iterator_next(ErlNifEnv *env, ErlNifMapIterator *iter) { ASSERT(iter); @@ -3475,6 +3628,7 @@ int enif_map_iterator_next(ErlNifEnv *en } } +__attribute__((externally_visible)) int enif_map_iterator_prev(ErlNifEnv *env, ErlNifMapIterator *iter) { ASSERT(iter); @@ -3501,6 +3655,7 @@ int enif_map_iterator_prev(ErlNifEnv *en } } +__attribute__((externally_visible)) int enif_map_iterator_get_pair(ErlNifEnv *env, ErlNifMapIterator *iter, Eterm *key, @@ -3529,6 +3684,7 @@ int enif_map_iterator_get_pair(ErlNifEnv return 0; } +__attribute__((externally_visible)) int enif_monitor_process(ErlNifEnv* env, void* obj, const ErlNifPid* target_pid, ErlNifMonitor* monitor) { @@ -3586,12 +3742,14 @@ int enif_monitor_process(ErlNifEnv* env, return 0; } +__attribute__((externally_visible)) ERL_NIF_TERM enif_make_monitor_term(ErlNifEnv* env, const ErlNifMonitor* monitor) { Eterm* hp = alloc_heap(env, ERTS_REF_THING_SIZE); return erts_driver_monitor_to_ref(hp, monitor); } +__attribute__((externally_visible)) int enif_demonitor_process(ErlNifEnv* env, void* obj, const ErlNifMonitor* monitor) { ErtsResource* rsrc = DATA_TO_RESOURCE(obj); @@ -3627,6 +3785,7 @@ int enif_demonitor_process(ErlNifEnv* en return 0; } +__attribute__((externally_visible)) int enif_compare_monitors(const ErlNifMonitor *monitor1, const ErlNifMonitor *monitor2) { @@ -3634,6 +3793,7 @@ int enif_compare_monitors(const ErlNifMo ERTS_REF_THING_SIZE*sizeof(Eterm)); } +__attribute__((externally_visible)) ErlNifIOQueue *enif_ioq_create(ErlNifIOQueueOpts opts) { ErlNifIOQueue *q; @@ -3648,6 +3808,7 @@ ErlNifIOQueue *enif_ioq_create(ErlNifIOQ return q; } +__attribute__((externally_visible)) void enif_ioq_destroy(ErlNifIOQueue *q) { erts_ioq_clear(q); @@ -3658,6 +3819,7 @@ void enif_ioq_destroy(ErlNifIOQueue *q) * such to perform a proper free. */ #define ERL_NIF_IOVEC_FLAGS_PREALLOC (1 << 0) +__attribute__((externally_visible)) void enif_free_iovec(ErlNifIOVec *iov) { int i; @@ -3947,6 +4109,7 @@ static int create_iovec_from_slice(ErlNi return 1; } +__attribute__((externally_visible)) int enif_inspect_iovec(ErlNifEnv *env, size_t max_elements, ERL_NIF_TERM list, ERL_NIF_TERM *tail, ErlNifIOVec **iov) { @@ -3964,6 +4127,7 @@ int enif_inspect_iovec(ErlNifEnv *env, s } /* */ +__attribute__((externally_visible)) int enif_ioq_enqv(ErlNifIOQueue *q, ErlNifIOVec *iov, size_t skip) { if(skip <= iov->size) { @@ -3973,6 +4137,7 @@ int enif_ioq_enqv(ErlNifIOQueue *q, ErlN return 0; } +__attribute__((externally_visible)) int enif_ioq_enq_binary(ErlNifIOQueue *q, ErlNifBinary *bin, size_t skip) { ErlNifIOVec vec = {1, bin->size, NULL, NULL, ERL_NIF_IOVEC_FLAGS_PREALLOC }; @@ -3989,11 +4154,13 @@ int enif_ioq_enq_binary(ErlNifIOQueue *q return res; } +__attribute__((externally_visible)) size_t enif_ioq_size(ErlNifIOQueue *q) { return erts_ioq_size(q); } +__attribute__((externally_visible)) int enif_ioq_deq(ErlNifIOQueue *q, size_t elems, size_t *size) { if (erts_ioq_deq(q, elems) == -1) @@ -4003,6 +4170,7 @@ int enif_ioq_deq(ErlNifIOQueue *q, size_ return 1; } +__attribute__((externally_visible)) int enif_ioq_peek_head(ErlNifEnv *env, ErlNifIOQueue *q, size_t *size, ERL_NIF_TERM *bin_term) { SysIOVec *iov_entry; Binary *ref_bin; @@ -4052,6 +4220,7 @@ int enif_ioq_peek_head(ErlNifEnv *env, E return 1; } +__attribute__((externally_visible)) SysIOVec *enif_ioq_peek(ErlNifIOQueue *q, int *iovlen) { return erts_ioq_peekq(q, iovlen); diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/erl_port_task.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_port_task.c --- otp_src_23.3.4.19/erts/emulator/beam/erl_port_task.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_port_task.c 2023-08-29 22:38:39.462248930 +0300 @@ -761,6 +761,7 @@ enqueue_proc2port_data(Port *pp, * as a write-read request. */ +__attribute__((externally_visible)) void erl_drv_busy_msgq_limits(ErlDrvPort dport, ErlDrvSizeT *lowp, ErlDrvSizeT *highp) { @@ -1269,6 +1270,7 @@ select_task_for_exec(Port *pp, * Cut time slice */ +__attribute__((externally_visible)) int erl_drv_consume_timeslice(ErlDrvPort dprt, int percent) { diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/erl_posix_str.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_posix_str.c --- otp_src_23.3.4.19/erts/emulator/beam/erl_posix_str.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/erl_posix_str.c 2023-08-29 22:38:39.462248930 +0300 @@ -46,6 +46,7 @@ *---------------------------------------------------------------------- */ +__attribute__((externally_visible)) char * erl_errno_id(error) int error; /* Posix error number (as from errno). */ diff -Ndurp otp_src_23.3.4.19/erts/emulator/beam/io.c otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/io.c --- otp_src_23.3.4.19/erts/emulator/beam/io.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/beam/io.c 2023-08-29 22:38:39.462248930 +0300 @@ -72,6 +72,7 @@ static erts_tsd_key_t driver_list_last_e ErtsPTab erts_port erts_align_attribute(ERTS_CACHE_LINE_SIZE); /* The port table */ +__attribute__((externally_visible)) const ErlDrvTermData driver_term_nil = (ErlDrvTermData)NIL; const Port erts_invalid_port = {{ERTS_INVALID_PORT}}; @@ -187,6 +188,7 @@ typedef struct line_buf_context { dtrace_proc_str((PID), process_str); \ dtrace_port_str((PORT), port_str); +__attribute__((externally_visible)) void dtrace_drvport_str(ErlDrvPort drvport, char *port_buf) { @@ -757,6 +759,7 @@ ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(xports_ * Historical reason: to be used with inet_drv for creating * accept sockets inorder to avoid a global table. */ +__attribute__((externally_visible)) ErlDrvPort driver_create_port(ErlDrvPort creator_port_ix, /* Creating port */ ErlDrvTermData pid, /* Owner/Caller */ @@ -5167,6 +5170,7 @@ print_port_info(Port *p, fmtfn_t to, voi } } +__attribute__((externally_visible)) void set_busy_port(ErlDrvPort dprt, int on) { @@ -5277,6 +5281,7 @@ erts_port_resume_procs(Port *prt) } } +__attribute__((externally_visible)) void set_port_control_flags(ErlDrvPort port_num, int flags) { Port *prt = erts_drvport2port(port_num); @@ -5284,6 +5289,7 @@ void set_port_control_flags(ErlDrvPort p prt->control_flags = flags; } +__attribute__((externally_visible)) int get_port_flags(ErlDrvPort ix) { int flags; @@ -5487,6 +5493,7 @@ erts_free_port_names(ErtsPortNames *pnp) erts_free(ERTS_ALC_T_PORT_NAMES, pnp); } +__attribute__((externally_visible)) ErlDrvTermData driver_mk_term_nil(void) { return driver_term_nil; @@ -6212,6 +6219,7 @@ done: return res; } +__attribute__((externally_visible)) int erl_drv_output_term(ErlDrvTermData port_id, ErlDrvTermData* data, int len) { /* May be called from arbitrary thread */ @@ -6228,6 +6236,7 @@ int erl_drv_output_term(ErlDrvTermData p * removal in OTP-R17. It is replaced by erl_drv_output_term() * above. */ +__attribute__((externally_visible)) int driver_output_term(ErlDrvPort drvport, ErlDrvTermData* data, int len) { @@ -6247,6 +6256,7 @@ driver_output_term(ErlDrvPort drvport, E return driver_deliver_term(prt, ERTS_PORT_GET_CONNECTED(prt), data, len); } +__attribute__((externally_visible)) int erl_drv_send_term(ErlDrvTermData port_id, ErlDrvTermData to, ErlDrvTermData* data, @@ -6264,6 +6274,7 @@ int erl_drv_send_term(ErlDrvTermData por * driver_send_term() is deprecated, and has been scheduled for * removal in OTP-R17. It is replaced by erl_drv_send_term() above. */ +__attribute__((externally_visible)) int driver_send_term(ErlDrvPort drvport, ErlDrvTermData to, @@ -6297,6 +6308,7 @@ driver_send_term(ErlDrvPort drvport, * and data is len length of bin starting from offset offs. */ +__attribute__((externally_visible)) int driver_output_binary(ErlDrvPort ix, char* hbuf, ErlDrvSizeT hlen, ErlDrvBinary* bin, ErlDrvSizeT offs, ErlDrvSizeT len) { @@ -6341,6 +6353,7 @@ int driver_output_binary(ErlDrvPort ix, ** Example: if hlen = 3 then the port owner will receive the data ** [H1,H2,H3 | T] */ +__attribute__((externally_visible)) int driver_output2(ErlDrvPort ix, char* hbuf, ErlDrvSizeT hlen, char* buf, ErlDrvSizeT len) { @@ -6392,12 +6405,14 @@ int driver_output2(ErlDrvPort ix, char* /* Interface functions available to driver writers */ +__attribute__((externally_visible)) int driver_output(ErlDrvPort ix, char* buf, ErlDrvSizeT len) { ERTS_CHK_NO_PROC_LOCKS; return driver_output2(ix, NULL, 0, buf, len); } +__attribute__((externally_visible)) int driver_outputv(ErlDrvPort ix, char* hbuf, ErlDrvSizeT hlen, ErlIOVec* vec, ErlDrvSizeT skip) { @@ -6460,6 +6475,7 @@ int driver_outputv(ErlDrvPort ix, char* ** input is a vector a buffer and a max length ** return bytes copied */ +__attribute__((externally_visible)) ErlDrvSizeT driver_vec_to_buf(ErlIOVec *vec, char *buf, ErlDrvSizeT len) { SysIOVec* iov = vec->iov; @@ -6486,6 +6502,7 @@ ErlDrvSizeT driver_vec_to_buf(ErlIOVec * * reference count on driver binaries... */ +__attribute__((externally_visible)) ErlDrvSInt driver_binary_get_refc(ErlDrvBinary *dbp) { @@ -6493,6 +6510,7 @@ driver_binary_get_refc(ErlDrvBinary *dbp return (ErlDrvSInt) erts_refc_read(&bp->intern.refc, 1); } +__attribute__((externally_visible)) ErlDrvSInt driver_binary_inc_refc(ErlDrvBinary *dbp) { @@ -6500,6 +6518,7 @@ driver_binary_inc_refc(ErlDrvBinary *dbp return (ErlDrvSInt) erts_refc_inctest(&bp->intern.refc, 2); } +__attribute__((externally_visible)) ErlDrvSInt driver_binary_dec_refc(ErlDrvBinary *dbp) { @@ -6512,6 +6531,7 @@ driver_binary_dec_refc(ErlDrvBinary *dbp ** Allocation/Deallocation of binary objects */ +__attribute__((externally_visible)) ErlDrvBinary* driver_alloc_binary(ErlDrvSizeT size) { @@ -6525,6 +6545,7 @@ driver_alloc_binary(ErlDrvSizeT size) /* Reallocate space held by binary */ +__attribute__((externally_visible)) ErlDrvBinary* driver_realloc_binary(ErlDrvBinary* bin, ErlDrvSizeT size) { Binary* oldbin; @@ -6542,6 +6563,7 @@ ErlDrvBinary* driver_realloc_binary(ErlD } +__attribute__((externally_visible)) void driver_free_binary(ErlDrvBinary* dbin) { Binary *bin; @@ -6557,16 +6579,19 @@ void driver_free_binary(ErlDrvBinary* db * Allocation/deallocation of memory for drivers */ +__attribute__((externally_visible)) void *driver_alloc(ErlDrvSizeT size) { return erts_alloc_fnf(ERTS_ALC_T_DRV, (Uint) size); } +__attribute__((externally_visible)) void *driver_realloc(void *ptr, ErlDrvSizeT size) { return erts_realloc_fnf(ERTS_ALC_T_DRV, ptr, (Uint) size); } +__attribute__((externally_visible)) void driver_free(void *ptr) { erts_free(ERTS_ALC_T_DRV, ptr); @@ -6663,6 +6688,7 @@ static void driver_monitor_unlock_pdl(Po * exported driver_pdl_* functions ... */ +__attribute__((externally_visible)) ErlDrvPDL driver_pdl_create(ErlDrvPort dp) { @@ -6683,6 +6709,7 @@ driver_pdl_create(ErlDrvPort dp) return pdl; } +__attribute__((externally_visible)) void driver_pdl_lock(ErlDrvPDL pdl) { @@ -6693,6 +6720,7 @@ driver_pdl_lock(ErlDrvPDL pdl) erts_mtx_lock(&pdl->mtx); } +__attribute__((externally_visible)) void driver_pdl_unlock(ErlDrvPDL pdl) { @@ -6706,12 +6734,14 @@ driver_pdl_unlock(ErlDrvPDL pdl) pdl_destroy(pdl); } +__attribute__((externally_visible)) ErlDrvSInt driver_pdl_get_refc(ErlDrvPDL pdl) { return pdl_read_refc(pdl); } +__attribute__((externally_visible)) ErlDrvSInt driver_pdl_inc_refc(ErlDrvPDL pdl) { @@ -6723,6 +6753,7 @@ driver_pdl_inc_refc(ErlDrvPDL pdl) return refc; } +__attribute__((externally_visible)) ErlDrvSInt driver_pdl_dec_refc(ErlDrvPDL pdl) { @@ -6737,6 +6768,7 @@ driver_pdl_dec_refc(ErlDrvPDL pdl) } /* Put elements from vec at q tail */ +__attribute__((externally_visible)) int driver_enqv(ErlDrvPort ix, ErlIOVec* vec, ErlDrvSizeT skip) { ASSERT(vec->size >= skip); @@ -6744,6 +6776,7 @@ int driver_enqv(ErlDrvPort ix, ErlIOVec* } /* Put elements from vec at q head */ +__attribute__((externally_visible)) int driver_pushqv(ErlDrvPort ix, ErlIOVec* vec, ErlDrvSizeT skip) { ASSERT(vec->size >= skip); @@ -6754,6 +6787,7 @@ int driver_pushqv(ErlDrvPort ix, ErlIOVe ** Remove size bytes from queue head ** Return number of bytes that remain in queue */ +__attribute__((externally_visible)) ErlDrvSizeT driver_deq(ErlDrvPort ix, ErlDrvSizeT size) { ErlPortIOQueue *q = drvport2ioq(ix); @@ -6763,17 +6797,20 @@ ErlDrvSizeT driver_deq(ErlDrvPort ix, Er } +__attribute__((externally_visible)) ErlDrvSizeT driver_peekqv(ErlDrvPort ix, ErlIOVec *ev) { return erts_ioq_peekqv(drvport2ioq(ix), (ErtsIOVec*)ev); } +__attribute__((externally_visible)) SysIOVec* driver_peekq(ErlDrvPort ix, int* vlenp) /* length of io-vector */ { return erts_ioq_peekq(drvport2ioq(ix), vlenp); } +__attribute__((externally_visible)) ErlDrvSizeT driver_sizeq(ErlDrvPort ix) { ErlPortIOQueue *q = drvport2ioq(ix); @@ -6787,6 +6824,7 @@ ErlDrvSizeT driver_sizeq(ErlDrvPort ix) /* Utils */ /* Enqueue a binary */ +__attribute__((externally_visible)) int driver_enq_bin(ErlDrvPort ix, ErlDrvBinary* bin, ErlDrvSizeT offs, ErlDrvSizeT len) { @@ -6805,6 +6843,7 @@ int driver_enq_bin(ErlDrvPort ix, ErlDrv return driver_enqv(ix, &ev, 0); } +__attribute__((externally_visible)) int driver_enq(ErlDrvPort ix, char* buffer, ErlDrvSizeT len) { int code; @@ -6821,6 +6860,7 @@ int driver_enq(ErlDrvPort ix, char* buff return code; } +__attribute__((externally_visible)) int driver_pushq_bin(ErlDrvPort ix, ErlDrvBinary* bin, ErlDrvSizeT offs, ErlDrvSizeT len) { @@ -6839,6 +6879,7 @@ int driver_pushq_bin(ErlDrvPort ix, ErlD return driver_pushqv(ix, &ev, 0); } +__attribute__((externally_visible)) int driver_pushq(ErlDrvPort ix, char* buffer, ErlDrvSizeT len) { int code; @@ -6856,6 +6897,7 @@ int driver_pushq(ErlDrvPort ix, char* bu return code; } +__attribute__((externally_visible)) int driver_set_timer(ErlDrvPort ix, unsigned long t) { Port* prt = erts_drvport2port(ix); @@ -6872,6 +6914,7 @@ int driver_set_timer(ErlDrvPort ix, unsi return 0; } +__attribute__((externally_visible)) int driver_cancel_timer(ErlDrvPort ix) { Port* prt = erts_drvport2port(ix); @@ -6882,6 +6925,7 @@ int driver_cancel_timer(ErlDrvPort ix) return 0; } +__attribute__((externally_visible)) int driver_read_timer(ErlDrvPort ix, unsigned long* t) { @@ -6903,6 +6947,7 @@ driver_read_timer(ErlDrvPort ix, unsigne return 0; } +__attribute__((externally_visible)) int driver_get_now(ErlDrvNowData *now_data) { @@ -6988,6 +7033,7 @@ static int do_driver_monitor_process(Por /* * This can be called from a non scheduler thread iff a port_data_lock exists */ +__attribute__((externally_visible)) int driver_monitor_process(ErlDrvPort drvport, ErlDrvTermData process, ErlDrvMonitor *monitor) @@ -7027,6 +7073,7 @@ static int do_driver_demonitor_process(P return 0; } +__attribute__((externally_visible)) int driver_demonitor_process(ErlDrvPort drvport, const ErlDrvMonitor *monitor) { @@ -7065,6 +7112,7 @@ static ErlDrvTermData do_driver_get_moni } +__attribute__((externally_visible)) ErlDrvTermData driver_get_monitored_process(ErlDrvPort drvport, const ErlDrvMonitor *monitor) { @@ -7086,6 +7134,7 @@ ErlDrvTermData driver_get_monitored_proc return ret; } +__attribute__((externally_visible)) int driver_compare_monitors(const ErlDrvMonitor *monitor1, const ErlDrvMonitor *monitor2) { @@ -7181,6 +7230,7 @@ driver_failure_term(ErlDrvPort ix, Eterm ** Do a (soft) exit. unlink the connected process before doing ** driver posix error or (normal) */ +__attribute__((externally_visible)) int driver_exit(ErlDrvPort ix, int err) { Port* prt = erts_drvport2port(ix); @@ -7205,11 +7255,13 @@ int driver_exit(ErlDrvPort ix, int err) } +__attribute__((externally_visible)) int driver_failure(ErlDrvPort ix, int code) { return driver_failure_term(ix, make_small(code), code == 0); } +__attribute__((externally_visible)) int driver_failure_atom(ErlDrvPort ix, char* string) { return driver_failure_term(ix, @@ -7220,11 +7272,13 @@ int driver_failure_atom(ErlDrvPort ix, c 0); } +__attribute__((externally_visible)) int driver_failure_posix(ErlDrvPort ix, int err) { return driver_failure_atom(ix, erl_errno_id(err)); } +__attribute__((externally_visible)) int driver_failure_eof(ErlDrvPort ix) { return driver_failure_term(ix, NIL, 1); @@ -7232,6 +7286,7 @@ int driver_failure_eof(ErlDrvPort ix) +__attribute__((externally_visible)) ErlDrvTermData driver_mk_atom(char* string) { Eterm am = erts_atom_put((byte *) string, @@ -7242,6 +7297,7 @@ ErlDrvTermData driver_mk_atom(char* stri return (ErlDrvTermData) am; } +__attribute__((externally_visible)) ErlDrvTermData driver_mk_port(ErlDrvPort ix) { Port* prt = erts_drvport2port(ix); @@ -7251,6 +7307,7 @@ ErlDrvTermData driver_mk_port(ErlDrvPort return (ErlDrvTermData) prt->common.id; } +__attribute__((externally_visible)) ErlDrvTermData driver_connected(ErlDrvPort ix) { Port* prt = erts_drvport2port(ix); @@ -7261,6 +7318,7 @@ ErlDrvTermData driver_connected(ErlDrvPo return ERTS_PORT_GET_CONNECTED(prt); } +__attribute__((externally_visible)) ErlDrvTermData driver_caller(ErlDrvPort ix) { Port* prt = erts_drvport2port(ix); @@ -7271,6 +7329,7 @@ ErlDrvTermData driver_caller(ErlDrvPort return prt->caller; } +__attribute__((externally_visible)) int driver_lock_driver(ErlDrvPort ix) { Port* prt = erts_drvport2port(ix); @@ -7326,6 +7385,7 @@ static void maybe_unlock_driver_list(int Writing code using these interfaces spanning several driver callbacks between loading/lookup and error handling may give undesired results... */ +__attribute__((externally_visible)) void *driver_dl_open(char * path) { void *ptr; @@ -7346,6 +7406,7 @@ void *driver_dl_open(char * path) } } +__attribute__((externally_visible)) void *driver_dl_sym(void * handle, char *func_name) { void *ptr; @@ -7366,6 +7427,7 @@ void *driver_dl_sym(void * handle, char } } +__attribute__((externally_visible)) int driver_dl_close(void *handle) { int res; @@ -7375,6 +7437,7 @@ int driver_dl_close(void *handle) return res; } +__attribute__((externally_visible)) char *driver_dl_error(void) { char *res; @@ -7390,6 +7453,7 @@ char *driver_dl_error(void) (offsetof(ErlDrvSysInfo, LAST_FIELD) \ + sizeof(((ErlDrvSysInfo *) 0)->LAST_FIELD)) +__attribute__((externally_visible)) void driver_system_info(ErlDrvSysInfo *sip, size_t si_size) { @@ -7581,6 +7645,7 @@ erts_destroy_driver(erts_driver_t *drv) * Exposed in the driver interface, and therefore possibly locking directly. */ +__attribute__((externally_visible)) void add_driver_entry(ErlDrvEntry *drv){ void *rec_lock; rec_lock = erts_tsd_get(driver_list_lock_status_key); @@ -7639,6 +7704,7 @@ int erts_add_driver_entry(ErlDrvEntry *d } /* Not allowed for dynamic drivers */ +__attribute__((externally_visible)) int remove_driver_entry(ErlDrvEntry *drv) { erts_driver_t *dp; @@ -7681,11 +7747,13 @@ int remove_driver_entry(ErlDrvEntry *drv /* very useful function that can be used in entries that are not used * so that not every driver writer must supply a personal version */ +__attribute__((externally_visible)) int null_func(void) { return 0; } +__attribute__((externally_visible)) int erl_drv_putenv(const char *key, char *value) { @@ -7699,6 +7767,7 @@ erl_drv_putenv(const char *key, char *va } } +__attribute__((externally_visible)) int erl_drv_getenv(const char *key, char *value, size_t *value_size) { diff -Ndurp otp_src_23.3.4.19/erts/emulator/sys/common/erl_check_io.c otp_src_23.3.4.19-erts-symbols/erts/emulator/sys/common/erl_check_io.c --- otp_src_23.3.4.19/erts/emulator/sys/common/erl_check_io.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/emulator/sys/common/erl_check_io.c 2023-08-29 22:38:39.466248847 +0300 @@ -789,6 +789,7 @@ check_fd_cleanup(ErtsDrvEventState *stat # define MUST_DEFER(MAY_SLEEP) (MAY_SLEEP) #endif +__attribute__((externally_visible)) int driver_select(ErlDrvPort ix, ErlDrvEvent e, int mode, int on) { diff -Ndurp otp_src_23.3.4.19/erts/lib_src/common/erl_memory_trace_parser.c otp_src_23.3.4.19-erts-symbols/erts/lib_src/common/erl_memory_trace_parser.c --- otp_src_23.3.4.19/erts/lib_src/common/erl_memory_trace_parser.c 2023-06-05 12:06:09.000000000 +0300 +++ otp_src_23.3.4.19-erts-symbols/erts/lib_src/common/erl_memory_trace_parser.c 2023-08-29 22:38:39.466248847 +0300 @@ -160,7 +160,7 @@ struct emtp_state_ { static char unknown_allocator[] = "unknown_allocator"; static char unknown_block_type[] = "unknown_block_type"; -const char * +const char * __attribute__((externally_visible)) emtp_error_string(int res) { switch (res) { @@ -202,7 +202,7 @@ emtp_error_string(int res) } -int +int __attribute__((externally_visible)) emtp_get_info(emtp_info *infop, size_t *info_szp, emtp_state *statep) { if (!infop || !info_szp || *info_szp < sizeof(emtp_info)) @@ -254,7 +254,7 @@ emtp_get_info(emtp_info *infop, size_t * return 1; } -emtp_state * +emtp_state * __attribute__((externally_visible)) emtp_state_new(void * (*alloc)(size_t), void * (*realloc)(void *, size_t), void (*free)(void *)) @@ -307,7 +307,7 @@ emtp_state_new(void * (*alloc)(size_t), return statep; } -void +void __attribute__((externally_visible)) emtp_state_destroy(emtp_state *statep) { void (*freep)(void *); @@ -1653,7 +1653,7 @@ parse_header(emtp_state *statep, } -int +int __attribute__((externally_visible)) emtp_parse(emtp_state *statep, usgnd_int_8 **tracepp, size_t *trace_lenp, emtp_operation *op_start, size_t op_size, size_t *op_lenp)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor