data_type
large_stringclasses
3 values
source
large_stringclasses
29 values
code
large_stringlengths
98
49.4M
filepath
large_stringlengths
5
161
message
large_stringclasses
234 values
commit
large_stringclasses
234 values
subject
large_stringclasses
418 values
critique
large_stringlengths
101
1.26M
metadata
dict
source
musl
#include "pthread_impl.h" #include "fork_impl.h" volatile size_t __pthread_tsd_size = sizeof(void *) * PTHREAD_KEYS_MAX; void *__pthread_tsd_main[PTHREAD_KEYS_MAX] = { 0 }; static void (*keys[PTHREAD_KEYS_MAX])(void *); static pthread_rwlock_t key_lock = PTHREAD_RWLOCK_INITIALIZER; static pthread_key_t next_key; s...
src/thread/pthread_key_create.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "lock.h" int pthread_kill(pthread_t t, int sig) { int r; sigset_t set; /* Block not just app signals, but internal ones too, since * pthread_kill is used to implement pthread_cancel, which * must be async-cancel-safe. */ __block_all_sigs(&set); LOCK(t->killlock); r = t->tid...
src/thread/pthread_kill.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "atomic.h" int pthread_mutex_consistent(pthread_mutex_t *m) { int old = m->_m_lock; int own = old & 0x3fffffff; if (!(m->_m_type & 4) || !own || !(old & 0x40000000)) return EINVAL; if (own != __pthread_self()->tid) return EPERM; a_and(&m->_m_lock, ~0x40000000); return 0; }
src/thread/pthread_mutex_consistent.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutex_destroy(pthread_mutex_t *mutex) { /* If the mutex being destroyed is process-shared and has nontrivial * type (tracking ownership), it might be in the pending slot of a * robust_list; wait for quiescence. */ if (mutex->_m_type > 128) __vm_wait(); return 0; }
src/thread/pthread_mutex_destroy.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict m, int *restrict ceiling) { return EINVAL; }
src/thread/pthread_mutex_getprioceiling.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutex_init(pthread_mutex_t *restrict m, const pthread_mutexattr_t *restrict a) { *m = (pthread_mutex_t){0}; if (a) m->_m_type = a->__attr; return 0; }
src/thread/pthread_mutex_init.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_mutex_lock(pthread_mutex_t *m) { if ((m->_m_type&15) == PTHREAD_MUTEX_NORMAL && !a_cas(&m->_m_lock, 0, EBUSY)) return 0; return __pthread_mutex_timedlock(m, 0); } weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
src/thread/pthread_mutex_lock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutex_setprioceiling(pthread_mutex_t *restrict m, int ceiling, int *restrict old) { return EINVAL; }
src/thread/pthread_mutex_setprioceiling.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #define IS32BIT(x) !((x)+0x80000000ULL>>32) #define CLAMP(x) (int)(IS32BIT(x) ? (x) : 0x7fffffffU+((0ULL+(x))>>63)) static int __futex4(volatile void *addr, int op, int val, const struct timespec *to) { #ifdef SYS_futex_time64 time_t s = to ? to->tv_sec : 0; long ns = to ? to->tv_nsec : 0;...
src/thread/pthread_mutex_timedlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_mutex_trylock_owner(pthread_mutex_t *m) { int old, own; int type = m->_m_type; pthread_t self = __pthread_self(); int tid = self->tid; old = m->_m_lock; own = old & 0x3fffffff; if (own == tid) { if ((type&8) && m->_m_count<0) { old &= 0x40000000; m->_m_count = 0;...
src/thread/pthread_mutex_trylock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_mutex_unlock(pthread_mutex_t *m) { pthread_t self; int waiters = m->_m_waiters; int cont; int type = m->_m_type & 15; int priv = (m->_m_type & 128) ^ 128; int new = 0; int old; if (type != PTHREAD_MUTEX_NORMAL) { self = __pthread_self(); old = m->_m_lock; int own ...
src/thread/pthread_mutex_unlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutexattr_init(pthread_mutexattr_t *a) { *a = (pthread_mutexattr_t){0}; return 0; }
src/thread/pthread_mutexattr_init.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "syscall.h" static volatile int check_pi_result = -1; int pthread_mutexattr_setprotocol(pthread_mutexattr_t *a, int protocol) { int r; switch (protocol) { case PTHREAD_PRIO_NONE: a->__attr &= ~8; return 0; case PTHREAD_PRIO_INHERIT: r = check_pi_result; if (r < 0) { v...
src/thread/pthread_mutexattr_setprotocol.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutexattr_setpshared(pthread_mutexattr_t *a, int pshared) { if (pshared > 1U) return EINVAL; a->__attr &= ~128U; a->__attr |= pshared<<7; return 0; }
src/thread/pthread_mutexattr_setpshared.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "syscall.h" static volatile int check_robust_result = -1; int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust) { if (robust > 1U) return EINVAL; if (robust) { int r = check_robust_result; if (r < 0) { void *p; size_t l; r = -__syscall(SYS_get_robust_lis...
src/thread/pthread_mutexattr_setrobust.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_mutexattr_settype(pthread_mutexattr_t *a, int type) { if ((unsigned)type > 2) return EINVAL; a->__attr = (a->__attr & ~3) | type; return 0; }
src/thread/pthread_mutexattr_settype.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" static void undo(void *control) { /* Wake all waiters, since the waiter status is lost when * resetting control to the initial state. */ if (a_swap(control, 0) == 3) __wake(control, -1, 1); } hidden int __pthread_once_full(pthread_once_t *control, void (*init)(void)) { /* Try to enter...
src/thread/pthread_once.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_rwlock_init(pthread_rwlock_t *restrict rw, const pthread_rwlockattr_t *restrict a) { *rw = (pthread_rwlock_t){0}; if (a) rw->_rw_shared = a->__attr[0]*128; return 0; }
src/thread/pthread_rwlock_init.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_rdlock(pthread_rwlock_t *rw) { return __pthread_rwlock_timedrdlock(rw, 0); } weak_alias(__pthread_rwlock_rdlock, pthread_rwlock_rdlock);
src/thread/pthread_rwlock_rdlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rw, const struct timespec *restrict at) { int r, t; r = pthread_rwlock_tryrdlock(rw); if (r != EBUSY) return r; int spins = 100; while (spins-- && rw->_rw_lock && !rw->_rw_waiters) a_spin(); while ((r=__pthread_rwlock_tryrd...
src/thread/pthread_rwlock_timedrdlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict rw, const struct timespec *restrict at) { int r, t; r = pthread_rwlock_trywrlock(rw); if (r != EBUSY) return r; int spins = 100; while (spins-- && rw->_rw_lock && !rw->_rw_waiters) a_spin(); while ((r=__pthread_rwlock_tryw...
src/thread/pthread_rwlock_timedwrlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_tryrdlock(pthread_rwlock_t *rw) { int val, cnt; do { val = rw->_rw_lock; cnt = val & 0x7fffffff; if (cnt == 0x7fffffff) return EBUSY; if (cnt == 0x7ffffffe) return EAGAIN; } while (a_cas(&rw->_rw_lock, val, val+1) != val); return 0; } weak_alias(__pthread_rwl...
src/thread/pthread_rwlock_tryrdlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_trywrlock(pthread_rwlock_t *rw) { if (a_cas(&rw->_rw_lock, 0, 0x7fffffff)) return EBUSY; return 0; } weak_alias(__pthread_rwlock_trywrlock, pthread_rwlock_trywrlock);
src/thread/pthread_rwlock_trywrlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_unlock(pthread_rwlock_t *rw) { int val, cnt, waiters, new, priv = rw->_rw_shared^128; do { val = rw->_rw_lock; cnt = val & 0x7fffffff; waiters = rw->_rw_waiters; new = (cnt == 0x7fffffff || cnt == 1) ? 0 : val-1; } while (a_cas(&rw->_rw_lock, val, new) != val)...
src/thread/pthread_rwlock_unlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_rwlock_wrlock(pthread_rwlock_t *rw) { return __pthread_rwlock_timedwrlock(rw, 0); } weak_alias(__pthread_rwlock_wrlock, pthread_rwlock_wrlock);
src/thread/pthread_rwlock_wrlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_rwlockattr_init(pthread_rwlockattr_t *a) { *a = (pthread_rwlockattr_t){0}; return 0; }
src/thread/pthread_rwlockattr_init.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int pshared) { if (pshared > 1U) return EINVAL; a->__attr[0] = pshared; return 0; }
src/thread/pthread_rwlockattr_setpshared.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include <threads.h> static pthread_t __pthread_self_internal() { return __pthread_self(); } weak_alias(__pthread_self_internal, pthread_self); weak_alias(__pthread_self_internal, thrd_current);
src/thread/pthread_self.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "pthread_impl.h" #include <string.h> #define MIN(a,b) ((a)<(b) ? (a) : (b)) #define MAX(a,b) ((a)>(b) ? (a) : (b)) int pthread_setattr_default_np(const pthread_attr_t *attrp) { /* Reject anything in the attr object other than stack/guard size. */ pthread_attr_t tmp = *attrp, zero = { 0 ...
src/thread/pthread_setattr_default_np.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int __pthread_setcancelstate(int new, int *old) { if (new > 2U) return EINVAL; struct pthread *self = __pthread_self(); if (old) *old = self->canceldisable; self->canceldisable = new; return 0; } weak_alias(__pthread_setcancelstate, pthread_setcancelstate);
src/thread/pthread_setcancelstate.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_setcanceltype(int new, int *old) { struct pthread *self = __pthread_self(); if (new > 1U) return EINVAL; if (old) *old = self->cancelasync; self->cancelasync = new; if (new) pthread_testcancel(); return 0; }
src/thread/pthread_setcanceltype.c
null
null
null
null
null
source
musl
#include <pthread.h> #include <errno.h> int pthread_setconcurrency(int val) { if (val < 0) return EINVAL; if (val > 0) return EAGAIN; return 0; }
src/thread/pthread_setconcurrency.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include <fcntl.h> #include <string.h> #include <unistd.h> #include <sys/prctl.h> #include "pthread_impl.h" int pthread_setname_np(pthread_t thread, const char *name) { int fd, cs, status = 0; char f[sizeof "/proc/self/task//comm" + 3*sizeof(int)]; size_t len; if ((len = strnlen(name, 16)) > ...
src/thread/pthread_setname_np.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "lock.h" int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) { int r; sigset_t set; __block_app_sigs(&set); LOCK(t->killlock); r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); UNLOCK(t->killlock); __restore_sigs(&...
src/thread/pthread_setschedparam.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "lock.h" int pthread_setschedprio(pthread_t t, int prio) { int r; sigset_t set; __block_app_sigs(&set); LOCK(t->killlock); r = !t->tid ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio); UNLOCK(t->killlock); __restore_sigs(&set); return r; }
src/thread/pthread_setschedprio.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_setspecific(pthread_key_t k, const void *x) { struct pthread *self = __pthread_self(); /* Avoid unnecessary COW */ if (self->tsd[k] != x) { self->tsd[k] = (void *)x; self->tsd_used = 1; } return 0; }
src/thread/pthread_setspecific.c
null
null
null
null
null
source
musl
#include <signal.h> #include <errno.h> #include "syscall.h" int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict old) { int ret; if (set && (unsigned)how - SIG_BLOCK > 2U) return EINVAL; ret = -__syscall(SYS_rt_sigprocmask, how, set, old, _NSIG/8); if (!ret && old) { if (sizeof old->__bi...
src/thread/pthread_sigmask.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_spin_init(pthread_spinlock_t *s, int shared) { return *s = 0; }
src/thread/pthread_spin_init.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include <errno.h> int pthread_spin_lock(pthread_spinlock_t *s) { while (*(volatile int *)s || a_cas(s, 0, EBUSY)) a_spin(); return 0; }
src/thread/pthread_spin_lock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include <errno.h> int pthread_spin_trylock(pthread_spinlock_t *s) { return a_cas(s, 0, EBUSY); }
src/thread/pthread_spin_trylock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" int pthread_spin_unlock(pthread_spinlock_t *s) { a_store(s, 0); return 0; }
src/thread/pthread_spin_unlock.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" static void dummy() { } weak_alias(dummy, __testcancel); void __pthread_testcancel() { __testcancel(); } weak_alias(__pthread_testcancel, pthread_testcancel);
src/thread/pthread_testcancel.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <limits.h> int sem_getvalue(sem_t *restrict sem, int *restrict valp) { int val = sem->__val[0]; *valp = val & SEM_VALUE_MAX; return 0; }
src/thread/sem_getvalue.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <limits.h> #include <errno.h> int sem_init(sem_t *sem, int pshared, unsigned value) { if (value > SEM_VALUE_MAX) { errno = EINVAL; return -1; } sem->__val[0] = value; sem->__val[1] = 0; sem->__val[2] = pshared ? 0 : 128; return 0; }
src/thread/sem_init.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <sys/mman.h> #include <limits.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <stdarg.h> #include <errno.h> #include <time.h> #include <stdio.h> #include <sys/stat.h> #include <stdlib.h> #include <pthread.h> #include "lock.h" #include "fork_impl.h" #define malloc ...
src/thread/sem_open.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <limits.h> #include "pthread_impl.h" int sem_post(sem_t *sem) { int val, new, waiters, priv = sem->__val[2]; do { val = sem->__val[0]; waiters = sem->__val[1]; if ((val & SEM_VALUE_MAX) == SEM_VALUE_MAX) { errno = EOVERFLOW; return -1; } new = val + 1; if (waiters <=...
src/thread/sem_post.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <limits.h> #include "pthread_impl.h" static void cleanup(void *p) { a_dec(p); } int sem_timedwait(sem_t *restrict sem, const struct timespec *restrict at) { pthread_testcancel(); if (!sem_trywait(sem)) return 0; int spins = 100; while (spins-- && !(sem->__val[0] & SEM_VALUE_MAX)...
src/thread/sem_timedwait.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <limits.h> #include "pthread_impl.h" int sem_trywait(sem_t *sem) { int val; while ((val=sem->__val[0]) & SEM_VALUE_MAX) { if (a_cas(sem->__val, val, val-1)==val) return 0; } errno = EAGAIN; return -1; }
src/thread/sem_trywait.c
null
null
null
null
null
source
musl
#include <semaphore.h> #include <sys/mman.h> int sem_unlink(const char *name) { return shm_unlink(name); }
src/thread/sem_unlink.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include <semaphore.h> #include <string.h> static void dummy_0(void) { } weak_alias(dummy_0, __tl_lock); weak_alias(dummy_0, __tl_unlock); static int target_tid; static void (*callback)(void *), *context; static sem_t target_sem, caller_sem, exit_sem; static void dummy(void *p) { } static...
src/thread/synccall.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include <threads.h> int thrd_create(thrd_t *thr, thrd_start_t func, void *arg) { int ret = __pthread_create(thr, __ATTRP_C11_THREAD, (void *(*)(void *))func, arg); switch (ret) { case 0: return thrd_success; case EAGAIN: return thrd_nomem; default: return thrd_error; } }
src/thread/thrd_create.c
null
null
null
null
null
source
musl
#include <threads.h> #include <pthread.h> #include <stdint.h> _Noreturn void thrd_exit(int result) { __pthread_exit((void*)(intptr_t)result); }
src/thread/thrd_exit.c
null
null
null
null
null
source
musl
#include <stdint.h> #include <threads.h> #include <pthread.h> int thrd_join(thrd_t t, int *res) { void *pthread_res; __pthread_join(t, &pthread_res); if (res) *res = (int)(intptr_t)pthread_res; return thrd_success; }
src/thread/thrd_join.c
null
null
null
null
null
source
musl
#include <threads.h> #include <time.h> #include <errno.h> #include "syscall.h" int thrd_sleep(const struct timespec *req, struct timespec *rem) { int ret = -__clock_nanosleep(CLOCK_REALTIME, 0, req, rem); switch (ret) { case 0: return 0; case -EINTR: return -1; /* value specified by C11 */ default: retur...
src/thread/thrd_sleep.c
null
null
null
null
null
source
musl
#include <threads.h> #include <pthread.h> int tss_create(tss_t *tss, tss_dtor_t dtor) { /* Different error returns are possible. C glues them together into * just failure notification. Can't be optimized to a tail call, * unless thrd_error equals EAGAIN. */ return __pthread_key_create(tss, dtor) ? thrd_error : t...
src/thread/tss_create.c
null
null
null
null
null
source
musl
#include <threads.h> #include <pthread.h> void tss_delete(tss_t key) { __pthread_key_delete(key); }
src/thread/tss_delete.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include <threads.h> int tss_set(tss_t k, void *x) { struct pthread *self = __pthread_self(); /* Avoid unnecessary COW */ if (self->tsd[k] != x) { self->tsd[k] = x; self->tsd_used = 1; } return thrd_success; }
src/thread/tss_set.c
null
null
null
null
null
source
musl
#include "pthread_impl.h" #include "fork_impl.h" static volatile int vmlock[2]; volatile int *const __vmlock_lockptr = vmlock; void __vm_wait() { int tmp; while ((tmp=vmlock[0])) __wait(vmlock, vmlock+1, tmp, 1); } void __vm_lock() { a_inc(vmlock); } void __vm_unlock() { if (a_fetch_add(vmlock, -1)==1 && vmlo...
src/thread/vmlock.c
null
null
null
null
null
source
musl
#include <elf.h> #include "libc.h" #define BITRANGE(a,b) (2*(1UL<<(b))-(1UL<<(a))) int __set_thread_area(void *p) { __asm__ __volatile__ ("msr tpidr_el0,%0" : : "r"(p) : "memory"); /* Mask off hwcap bits for SME and unknown future features. This is * necessary because SME is not safe to use without libc support ...
src/thread/aarch64/__set_thread_area.c
null
null
null
null
null
source
musl
.global __unmapself .type __unmapself,%function __unmapself: mov x8,#215 // SYS_munmap svc 0 mov x8,#93 // SYS_exit svc 0
src/thread/aarch64/__unmapself.s
null
null
null
null
null
source
musl
// __clone(func, stack, flags, arg, ptid, tls, ctid) // x0, x1, w2, x3, x4, x5, x6 // syscall(SYS_clone, flags, stack, ptid, tls, ctid) // x8, x0, x1, x2, x3, x4 .global __clone .hidden __clone .type __clone,%function __clone: // align stack and save func,arg and x1,x1,...
src/thread/aarch64/clone.s
null
null
null
null
null
source
musl
// __syscall_cp_asm(&self->cancel, nr, u, v, w, x, y, z) // x0 x1 x2 x3 x4 x5 x6 x7 // syscall(nr, u, v, w, x, y, z) // x8 x0 x1 x2 x3 x4 x5 .global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global _...
src/thread/aarch64/syscall_cp.s
null
null
null
null
null
source
musl
.syntax unified .global __aeabi_read_tp .type __aeabi_read_tp,%function __aeabi_read_tp: ldr r0,1f add r0,r0,pc ldr r0,[r0] 2: bx r0 .align 2 1: .word __a_gettp_ptr - 2b
src/thread/arm/__aeabi_read_tp.s
null
null
null
null
null
source
musl
#include <stdint.h> #include <elf.h> #include "pthread_impl.h" #include "libc.h" #define HWCAP_TLS (1 << 15) extern hidden const unsigned char __a_barrier_oldkuser[], __a_barrier_v6[], __a_barrier_v7[], __a_cas_v6[], __a_cas_v7[], __a_gettp_cp15[]; #define __a_barrier_kuser 0xffff0fa0 #define __a_barrier_oldkuser...
src/thread/arm/__set_thread_area.c
null
null
null
null
null
source
musl
.syntax unified .text .global __unmapself .type __unmapself,%function __unmapself: mov r7,#91 svc 0 mov r7,#1 svc 0
src/thread/arm/__unmapself.s
null
null
null
null
null
source
musl
.syntax unified .text .global __a_barrier_dummy .hidden __a_barrier_dummy .type __a_barrier_dummy,%function __a_barrier_dummy: bx lr .global __a_barrier_oldkuser .hidden __a_barrier_oldkuser .type __a_barrier_oldkuser,%function __a_barrier_oldkuser: push {r0,r1,r2,r3,ip,lr} mov r1,r0 mov r2,sp ldr ip,=0xffff0fc0...
src/thread/arm/atomics.s
null
null
null
null
null
source
musl
.syntax unified .text .global __clone .hidden __clone .type __clone,%function __clone: stmfd sp!,{r4,r5,r6,r7} mov r7,#120 mov r6,r3 mov r5,r0 mov r0,r2 and r1,r1,#-16 ldr r2,[sp,#16] ldr r3,[sp,#20] ldr r4,[sp,#24] svc 0 tst r0,r0 beq 1f ldmfd sp!,{r4,r5,r6,r7} bx lr 1: mov fp,#0 mov r0,r6 bl 3f 2: ...
src/thread/arm/clone.s
null
null
null
null
null
source
musl
.syntax unified .global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,%function __syscall_cp_asm: mov ip,sp stmfd sp!,{r4,r5,r6,r7} __cp_begin: ldr r0,[r0] cmp r0,#0 b...
src/thread/arm/syscall_cp.s
null
null
null
null
null
source
musl
.text .global __set_thread_area .hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: push %ebx push $0x51 push $0xfffff push 16(%esp) call 1f 1: addl $4f-1b,(%esp) pop %ecx mov (%ecx),%edx push %edx mov %esp,%ebx xor %eax,%eax mov $243,%al int $128 testl %eax,%eax jnz 2f movl ...
src/thread/i386/__set_thread_area.s
null
null
null
null
null
source
musl
.text .global __unmapself .type __unmapself,@function __unmapself: movl $91,%eax movl 4(%esp),%ebx movl 8(%esp),%ecx int $128 xorl %ebx,%ebx movl $1,%eax int $128
src/thread/i386/__unmapself.s
null
null
null
null
null
source
musl
.text .global __clone .hidden __clone .type __clone,@function __clone: push %ebp mov %esp,%ebp push %ebx push %esi push %edi xor %eax,%eax push $0x51 mov %gs,%ax push $0xfffff shr $3,%eax push 28(%ebp) push %eax mov $120,%al mov 12(%ebp),%ecx mov 16(%ebp),%ebx and $-16,%ecx sub $16,%ecx mov 20(%eb...
src/thread/i386/clone.s
null
null
null
null
null
source
musl
.text .global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,@function __syscall_cp_asm: mov 4(%esp),%ecx pushl %ebx pushl %esi pushl %edi pushl %ebp __cp_begin: mov...
src/thread/i386/syscall_cp.s
null
null
null
null
null
source
musl
.text .global ___tls_get_addr .type ___tls_get_addr,@function ___tls_get_addr: mov %gs:4,%edx mov (%eax),%ecx mov 4(%eax),%eax add (%edx,%ecx,4),%eax ret
src/thread/i386/tls.s
null
null
null
null
null
source
musl
.global __set_thread_area .hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: move $tp, $a0 move $a0, $zero jr $ra
src/thread/loongarch64/__set_thread_area.s
null
null
null
null
null
source
musl
.global __unmapself .type __unmapself, @function __unmapself: li.d $a7, 215 # call munmap syscall 0 li.d $a7, 93 # call exit syscall 0
src/thread/loongarch64/__unmapself.s
null
null
null
null
null
source
musl
#__clone(func, stack, flags, arg, ptid, tls, ctid) # a0, a1, a2, a3, a4, a5, a6 # sys_clone(flags, stack, ptid, ctid, tls) # a0, a1, a2, a3, a4 .global __clone .hidden __clone .type __clone,@function __clone: bstrins.d $a1, $zero, 3, 0 #stack to 16 align # Save function poin...
src/thread/loongarch64/clone.s
null
null
null
null
null
source
musl
.global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,@function __syscall_cp_asm: __cp_begin: ld.w $a0, $a0, 0 bnez $a0, __cp_cancel move $t8, $a1 # reserve system...
src/thread/loongarch64/syscall_cp.s
null
null
null
null
null
source
musl
.text .global __m68k_read_tp .type __m68k_read_tp,@function __m68k_read_tp: move.l #333,%d0 trap #0 move.l %d0,%a0 rts
src/thread/m68k/__m68k_read_tp.s
null
null
null
null
null
source
musl
.text .global __clone .hidden __clone .type __clone,@function __clone: movem.l %d2-%d5,-(%sp) move.l #120,%d0 move.l 28(%sp),%d1 move.l 24(%sp),%d2 and.l #-16,%d2 move.l 36(%sp),%d3 move.l 44(%sp),%d4 move.l 40(%sp),%d5 move.l 20(%sp),%a0 move.l 32(%sp),%a1 trap #0 tst.l %d0 beq 1f movem.l (%sp)+,%d2-%d...
src/thread/m68k/clone.s
null
null
null
null
null
source
musl
.text .global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,@function __syscall_cp_asm: movem.l %d2-%d5,-(%sp) movea.l 20(%sp),%a0 __cp_begin: move.l (%a0),%d0 bne __...
src/thread/m68k/syscall_cp.s
null
null
null
null
null
source
musl
.global __set_thread_area .hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: ori r21, r5, 0 rtsd r15, 8 ori r3, r0, 0
src/thread/microblaze/__set_thread_area.s
null
null
null
null
null
source
musl
.global __unmapself .type __unmapself,@function __unmapself: ori r12, r0, 91 brki r14, 0x8 ori r12, r0, 1 brki r14, 0x8 nop
src/thread/microblaze/__unmapself.s
null
null
null
null
null
source
musl
.global __clone .hidden __clone .type __clone,@function # r5, r6, r7, r8, r9, r10, stack # fn, st, fl, ar, pt, tl, ct # fl, st, __, pt, ct, tl __clone: andi r6, r6, -16 addi r6, r6, -16 swi r5, r6, 0 swi r8, r6, 4 ori r5, r7, 0 ori r8, r9, 0 lwi r9, r1, 28 ori r12, r0, 120 b...
src/thread/microblaze/clone.s
null
null
null
null
null
source
musl
.global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,@function __syscall_cp_asm: __cp_begin: lwi r5, r5, 0 bnei r5, __cp_cancel addi r12, r6, 0 add r5,...
src/thread/microblaze/syscall_cp.s
null
null
null
null
null
source
musl
.set noreorder .global __unmapself .type __unmapself,@function __unmapself: move $sp, $25 li $2, 4091 syscall li $4, 0 li $2, 4001 syscall
src/thread/mips/__unmapself.s
null
null
null
null
null
source
musl
.set noreorder .global __clone .hidden __clone .type __clone,@function __clone: # Save function pointer and argument pointer on new thread stack and $5, $5, -8 subu $5, $5, 16 sw $4, 0($5) sw $7, 4($5) # Shuffle (fn,sp,fl,arg,ptid,tls,ctid) to (fl,sp,ptid,tls,ctid) move $4, $6 lw $6, 16($sp) lw $7, 20($sp) ...
src/thread/mips/clone.s
null
null
null
null
null
source
musl
.set noreorder .global __cp_begin .hidden __cp_begin .type __cp_begin,@function .global __cp_end .hidden __cp_end .type __cp_end,@function .global __cp_cancel .hidden __cp_cancel .type __cp_cancel,@function .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,@function _...
src/thread/mips/syscall_cp.s
null
null
null
null
null
source
musl
.set noreorder .global __unmapself .type __unmapself, @function __unmapself: li $2, 5011 syscall li $4, 0 li $2, 5058 syscall
src/thread/mips64/__unmapself.s
null
null
null
null
null
source
musl
.set noreorder .global __clone .hidden __clone .type __clone,@function __clone: # Save function pointer and argument pointer on new thread stack and $5, $5, -16 # aligning stack to double word dsubu $5, $5, 16 sd $4, 0($5) # save function pointer sd $7, 8($5) # save argument pointer # Shuffle (fn,sp,fl,arg,ptid,...
src/thread/mips64/clone.s
null
null
null
null
null
source
musl
.set noreorder .global __cp_begin .hidden __cp_begin .type __cp_begin,@function .global __cp_end .hidden __cp_end .type __cp_end,@function .global __cp_cancel .hidden __cp_cancel .type __cp_cancel,@function .global __cp_cancel_data .hidden __cp_cancel_data .type __cp_cancel_data,@function .hidden __cancel .global __sys...
src/thread/mips64/syscall_cp.s
null
null
null
null
null
source
musl
.set noreorder .global __unmapself .type __unmapself,@function __unmapself: li $2, 6011 syscall li $4, 0 li $2, 6058 syscall
src/thread/mipsn32/__unmapself.s
null
null
null
null
null
source
musl
.set noreorder .global __clone .hidden __clone .type __clone,@function __clone: # Save function pointer and argument pointer on new thread stack and $5, $5, -16 # aligning stack to double word subu $5, $5, 16 sw $4, 0($5) # save function pointer sw $7, 4($5) # save argument pointer # Shuffle (fn,sp,fl,arg,ptid,t...
src/thread/mipsn32/clone.s
null
null
null
null
null
source
musl
.set noreorder .global __cp_begin .hidden __cp_begin .type __cp_begin,@function .global __cp_end .hidden __cp_end .type __cp_end,@function .global __cp_cancel .hidden __cp_cancel .type __cp_cancel,@function .global __cp_cancel_data .hidden __cp_cancel_data .type __cp_cancel_data,@function .hidden __cancel .global __sys...
src/thread/mipsn32/syscall_cp.s
null
null
null
null
null
source
musl
.global __set_thread_area .hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: l.ori r10, r3, 0 l.jr r9 l.ori r11, r0, 0
src/thread/or1k/__set_thread_area.s
null
null
null
null
null
source
musl
.global __unmapself .type __unmapself,@function __unmapself: l.ori r11, r0, 215 /* __NR_munmap */ l.sys 1 l.ori r3, r0, 0 l.ori r11, r0, 93 /* __NR_exit */ l.sys 1
src/thread/or1k/__unmapself.s
null
null
null
null
null
source
musl
/* int clone(fn, stack, flags, arg, ptid, tls, ctid) * r3 r4 r5 r6 sp+0 sp+4 sp+8 * sys_clone(flags, stack, ptid, ctid, tls) */ .global __clone .hidden __clone .type __clone,@function __clone: l.xori r11, r0, -4 l.and r4, r4, r11 l.addi r4, r4, -8 l.sw 0(r4), r3 l.sw 4(r4), r6 /* (fn, s...
src/thread/or1k/clone.s
null
null
null
null
null
source
musl
.global __cp_begin .hidden __cp_begin .global __cp_end .hidden __cp_end .global __cp_cancel .hidden __cp_cancel .hidden __cancel .global __syscall_cp_asm .hidden __syscall_cp_asm .type __syscall_cp_asm,@function __syscall_cp_asm: __cp_begin: l.lwz r3, 0(r3) l.sfeqi r3, 0 l.bnf __cp_cancel l.ori r11, r4, 0 l.ori...
src/thread/or1k/syscall_cp.s
null
null
null
null
null
source
musl
.text .global __set_thread_area .hidden __set_thread_area .type __set_thread_area, %function __set_thread_area: # mov pointer in reg3 into r2 mr 2, 3 # put 0 into return reg li 3, 0 # return blr
src/thread/powerpc/__set_thread_area.s
null
null
null
null
null
source
musl
.text .global __unmapself .type __unmapself,%function __unmapself: li 0, 91 # __NR_munmap sc li 0, 1 #__NR_exit sc blr
src/thread/powerpc/__unmapself.s
null
null
null
null
null
source
musl
.text .global __clone .hidden __clone .type __clone, %function __clone: # int clone(fn, stack, flags, arg, ptid, tls, ctid) # a b c d e f g # 3 4 5 6 7 8 9 # pseudo C code: # tid = syscall(SYS_clone,c,b,e,f,g); # if (!tid) syscall(SYS_exit, a(d)); # return...
src/thread/powerpc/clone.s
null
null
null
null
null