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
/* copied from kernel definition, but with padding replaced * by the corresponding correctly-sized userspace types. */ struct stat { dev_t st_dev; ino_t st_ino; nlink_t st_nlink; mode_t st_mode; uid_t st_uid; gid_t st_gid; unsigned int __pad0; dev_t st_rdev; off_t st_size; blksize_t st_blksize; blkcnt_...
arch/x32/bits/stat.h
null
null
null
null
null
source
musl
struct statfs { unsigned long f_type, __pad0, f_bsize, __pad1; fsblkcnt_t f_blocks, f_bfree, f_bavail; fsfilcnt_t f_files, f_ffree; fsid_t f_fsid; unsigned long f_namelen, __pad2, f_frsize, __pad3; unsigned long f_flags, __pad4; unsigned long long f_spare[4]; };
arch/x32/bits/statfs.h
null
null
null
null
null
source
musl
typedef struct user_fpregs_struct { uint16_t cwd, swd, ftw, fop; uint64_t rip, rdp; uint32_t mxcsr, mxcr_mask; uint32_t st_space[32], xmm_space[64], padding[24]; } elf_fpregset_t; struct user_regs_struct { unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8; unsigned long rax, rcx, rdx, rsi, rdi, orig_r...
arch/x32/bits/user.h
null
null
null
null
null
source
musl
struct kstat { dev_t st_dev; ino_t st_ino; nlink_t st_nlink; mode_t st_mode; uid_t st_uid; gid_t st_gid; unsigned int __pad0; dev_t st_rdev; off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; long st_atime_sec; long st_atime_nsec; long st_mtime_sec; long st_mtime_nsec; long st_ctime_sec; lon...
arch/x86_64/kstat.h
null
null
null
null
null
source
musl
static inline uintptr_t __get_tp() { uintptr_t tp; __asm__ ("mov %%fs:0,%0" : "=r" (tp) ); return tp; } #define MC_PC gregs[REG_RIP]
arch/x86_64/pthread_arch.h
null
null
null
null
null
source
musl
#define LDSO_ARCH "x86_64" #define REL_SYMBOLIC R_X86_64_64 #define REL_OFFSET32 R_X86_64_PC32 #define REL_GOT R_X86_64_GLOB_DAT #define REL_PLT R_X86_64_JUMP_SLOT #define REL_RELATIVE R_X86_64_RELATIVE #define REL_COPY R_X86_64_COPY #define REL_DTPMOD R_X86_64_DTPMOD64 #define REL...
arch/x86_64/reloc.h
null
null
null
null
null
source
musl
#define __SYSCALL_LL_E(x) (x) #define __SYSCALL_LL_O(x) (x) static __inline long __syscall0(long n) { unsigned long ret; __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory"); return ret; } static __inline long __syscall1(long n, long a1) { unsigned long ret; __asm__ __volatile__ ("sysca...
arch/x86_64/syscall_arch.h
null
null
null
null
null
source
musl
struct semid_ds { struct ipc_perm sem_perm; time_t sem_otime; long __unused1; time_t sem_ctime; long __unused2; unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; long __unused3; long __unused4; };
arch/x86_64/bits/sem.h
null
null
null
null
null
source
musl
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 #endif #ifdef _GNU_SOURCE enum { REG_R8 = 0 }; #define REG_R8 RE...
arch/x86_64/bits/signal.h
null
null
null
null
null
source
musl
/* copied from kernel definition, but with padding replaced * by the corresponding correctly-sized userspace types. */ struct stat { dev_t st_dev; ino_t st_ino; nlink_t st_nlink; mode_t st_mode; uid_t st_uid; gid_t st_gid; unsigned int __pad0; dev_t st_rdev; off_t st_size; blksize_t st_blksize; blkcnt_...
arch/x86_64/bits/stat.h
null
null
null
null
null
source
musl
#include "time32.h" #include <sys/stat.h> struct stat32; int __fxstat(int ver, int fd, struct stat32 *buf) { return __fstat_time32(fd, buf); } int __fxstatat(int ver, int fd, const char *path, struct stat32 *buf, int flag) { return __fstatat_time32(fd, path, buf, flag); } int __lxstat(int ver, const char *path, s...
compat/time32/__xstat.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/timex.h> int __adjtime32(const struct timeval32 *in32, struct timeval32 *out32) { struct timeval out; int r = adjtime((&(struct timeval){ .tv_sec = in32->tv_sec, .tv_usec = in32->tv_usec}), &out); if (r) return r; /* ...
compat/time32/adjtime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/timex.h> struct timex32; int __adjtimex_time32(struct timex32 *tx32) { return __clock_adjtime32(CLOCK_REALTIME, tx32); }
compat/time32/adjtimex_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <aio.h> int __aio_suspend_time32(const struct aiocb *const cbs[], int cnt, const struct timespec32 *ts32) { return aio_suspend(cbs, cnt, ts32 ? (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0); }
compat/time32/aio_suspend_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <stddef.h> struct timex32 { unsigned modes; long offset, freq, maxerror, esterror; int status; long constant, precision, tolerance; struct timeval32 time; long tick, ppsfreq, jitter; int shift; long ...
compat/time32/clock_adjtime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> int __clock_getres_time32(clockid_t clk, struct timespec32 *ts32) { struct timespec ts; int r = clock_getres(clk, &ts); if (!r && ts32) { ts32->tv_sec = ts.tv_sec; ts32->tv_nsec = ts.tv_nsec; } return r; }
compat/time32/clock_getres_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <errno.h> #include <stdint.h> int __clock_gettime32(clockid_t clk, struct timespec32 *ts32) { struct timespec ts; int r = clock_gettime(clk, &ts); if (r) return r; if (ts.tv_sec < INT32_MIN || ts.tv_sec > INT32_MAX) { errno = EOVERFLOW; return -1; } ts32->tv_sec...
compat/time32/clock_gettime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <errno.h> int __clock_nanosleep_time32(clockid_t clk, int flags, const struct timespec32 *req32, struct timespec32 *rem32) { struct timespec rem; int ret = clock_nanosleep(clk, flags, (&(struct timespec){ .tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem); i...
compat/time32/clock_nanosleep_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> int __clock_settime32(clockid_t clk, const struct timespec32 *ts32) { return clock_settime(clk, (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/clock_settime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <threads.h> int __cnd_timedwait_time32(cnd_t *restrict c, mtx_t *restrict m, const struct timespec32 *restrict ts32) { return cnd_timedwait(c, m, ts32 ? (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0); }
compat/time32/cnd_timedwait_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> char *__ctime32(time32_t *t) { return ctime(&(time_t){*t}); }
compat/time32/ctime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> char *__ctime32_r(time32_t *t, char *buf) { return ctime_r(&(time_t){*t}, buf); }
compat/time32/ctime32_r.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> double __difftime32(time32_t t1, time32_t t2) { return difftime(t1, t2); }
compat/time32/difftime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <string.h> #include <sys/stat.h> #include <stddef.h> struct stat32; int __fstat_time32(int fd, struct stat32 *restrict st32) { struct stat st; int r = fstat(fd, &st); if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim)); return r; }
compat/time32/fstat_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <string.h> #include <sys/stat.h> #include <stddef.h> struct stat32; int __fstatat_time32(int fd, const char *restrict path, struct stat32 *restrict st32, int flag) { struct stat st; int r = fstatat(fd, path, &st, flag); if (!r) memcpy(st32, &st, offsetof(struct stat, ...
compat/time32/fstatat_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <sys/timeb.h> #include <errno.h> #include <stdint.h> struct timeb32 { int32_t time; unsigned short millitm; short timezone, dstflag; }; int __ftime32(struct timeb32 *tp) { struct timeb tb; if (ftime(&tb) < 0) return -1; if (tb.time < INT32_MIN || tb.time > INT32_MAX) { errno = EOV...
compat/time32/ftime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/stat.h> int __futimens_time32(int fd, const struct timespec32 *times32) { return futimens(fd, !times32 ? 0 : ((struct timespec[2]){ {.tv_sec = times32[0].tv_sec,.tv_nsec = times32[0].tv_nsec}, {.tv_sec = times32[1].tv_sec,.tv_nsec = times32[1].tv_nsec}})); }
compat/time32/futimens_time32.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/stat.h> int __futimes_time32(int fd, const struct timeval32 times32[2]) { return futimes(fd, !times32 ? 0 : ((struct timeval[2]){ {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec}, {.tv_sec = times32[1].tv_sec,...
compat/time32/futimes_time32.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/stat.h> int __futimesat_time32(int dirfd, const char *pathname, const struct timeval32 times32[2]) { return futimesat(dirfd, pathname, !times32 ? 0 : ((struct timeval[2]){ {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0]...
compat/time32/futimesat_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/time.h> int __getitimer_time32(int which, struct itimerval32 *old32) { struct itimerval old; int r = getitimer(which, &old); if (r) return r; old32->it_interval.tv_sec = old.it_interval.tv_sec; old32->it_interval.tv_usec = old.it_interval.tv_usec; old32->it_val...
compat/time32/getitimer_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <string.h> #include <stddef.h> #include <sys/resource.h> struct compat_rusage { struct timeval32 ru_utime; struct timeval32 ru_stime; long ru_maxrss; long ru_ixrss; long ru_idrss; long ru_isrss; long ru_minflt; long ru_majflt; long ru_nswap; long ru_inblock; long ru_oublock; lo...
compat/time32/getrusage_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <sys/time.h> #include <errno.h> #include <stdint.h> int __gettimeofday_time32(struct timeval32 *tv32, void *tz) { struct timeval tv; if (!tv32) return 0; int r = gettimeofday(&tv, 0); if (r) return r; if (tv.tv_sec < INT32_MIN || tv.tv_sec > INT32_MAX) { errno = EOVERFLOW; return ...
compat/time32/gettimeofday_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> struct tm *__gmtime32(time32_t *t) { return gmtime(&(time_t){*t}); }
compat/time32/gmtime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> struct tm *__gmtime32_r(time32_t *t, struct tm *tm) { return gmtime_r(&(time_t){*t}, tm); }
compat/time32/gmtime32_r.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> struct tm *__localtime32(time32_t *t) { return localtime(&(time_t){*t}); }
compat/time32/localtime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> struct tm *__localtime32_r(time32_t *t, struct tm *tm) { return localtime_r(&(time_t){*t}, tm); }
compat/time32/localtime32_r.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <string.h> #include <sys/stat.h> #include <stddef.h> struct stat32; int __lstat_time32(const char *restrict path, struct stat32 *restrict st32) { struct stat st; int r = lstat(path, &st); if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim)); return r; }
compat/time32/lstat_time32.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/stat.h> int __lutimes_time32(const char *path, const struct timeval32 times32[2]) { return lutimes(path, !times32 ? 0 : ((struct timeval[2]){ {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec}, {.tv_sec = times3...
compat/time32/lutimes_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <errno.h> #include <stdint.h> time32_t __mktime32(struct tm *tm) { struct tm tmp = *tm; time_t t = mktime(&tmp); if (t < INT32_MIN || t > INT32_MAX) { errno = EOVERFLOW; return -1; } *tm = tmp; return t; }
compat/time32/mktime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <mqueue.h> #include <time.h> ssize_t __mq_timedreceive_time32(mqd_t mqd, char *restrict msg, size_t len, unsigned *restrict prio, const struct timespec32 *restrict ts32) { return mq_timedreceive(mqd, msg, len, prio, ts32 ? (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv...
compat/time32/mq_timedreceive_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <mqueue.h> #include <time.h> int __mq_timedsend_time32(mqd_t mqd, const char *msg, size_t len, unsigned prio, const struct timespec32 *ts32) { return mq_timedsend(mqd, msg, len, prio, ts32 ? (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0); }
compat/time32/mq_timedsend_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <threads.h> int __mtx_timedlock_time32(mtx_t *restrict m, const struct timespec32 *restrict ts32) { return mtx_timedlock(m, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/mtx_timedlock_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <errno.h> int __nanosleep_time32(const struct timespec32 *req32, struct timespec32 *rem32) { struct timespec rem; int ret = nanosleep((&(struct timespec){ .tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem); if (ret<0 && errno==EINTR && rem32) { rem32->tv_s...
compat/time32/nanosleep_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #define _GNU_SOURCE #include <time.h> #include <poll.h> int __ppoll_time32(struct pollfd *fds, nfds_t n, const struct timespec32 *ts32, const sigset_t *mask) { return ppoll(fds, n, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask); }
compat/time32/ppoll_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/select.h> int __pselect_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, const struct timespec32 *restrict ts32, const sigset_t *restrict mask) { return pselect(n, rfds, wfds, efds, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32-...
compat/time32/pselect_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <pthread.h> int __pthread_cond_timedwait_time32(pthread_cond_t *restrict c, pthread_mutex_t *restrict m, const struct timespec32 *restrict ts32) { return pthread_cond_timedwait(c, m, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); ...
compat/time32/pthread_cond_timedwait_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <pthread.h> int __pthread_mutex_timedlock_time32(pthread_mutex_t *restrict m, const struct timespec32 *restrict ts32) { return pthread_mutex_timedlock(m, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/pthread_mutex_timedlock_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <pthread.h> int __pthread_rwlock_timedrdlock_time32(pthread_rwlock_t *restrict rw, const struct timespec32 *restrict ts32) { return pthread_rwlock_timedrdlock(rw, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/pthread_rwlock_timedrdlock_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <pthread.h> int __pthread_rwlock_timedwrlock_time32(pthread_rwlock_t *restrict rw, const struct timespec32 *restrict ts32) { return pthread_rwlock_timedwrlock(rw, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/pthread_rwlock_timedwrlock_time32.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> #include <pthread.h> int __pthread_timedjoin_np_time32(pthread_t t, void **res, const struct timespec32 *at32) { return pthread_timedjoin_np(t, res, !at32 ? 0 : (&(struct timespec){ .tv_sec = at32->tv_sec, .tv_nsec = at32->tv_nsec})); }
compat/time32/pthread_timedjoin_np_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #define _GNU_SOURCE #include <time.h> #include <sys/socket.h> int __recvmmsg_time32(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec32 *ts32) { return recvmmsg(fd, msgvec, vlen, flags, ts32 ? (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_n...
compat/time32/recvmmsg_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sched.h> int __sched_rr_get_interval_time32(pid_t pid, struct timespec32 *ts32) { struct timespec ts; int r = sched_rr_get_interval(pid, &ts); if (r) return r; ts32->tv_sec = ts.tv_sec; ts32->tv_nsec = ts.tv_nsec; return r; }
compat/time32/sched_rr_get_interval_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/select.h> int __select_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, struct timeval32 *restrict tv32) { return select(n, rfds, wfds, efds, !tv32 ? 0 : (&(struct timeval){ .tv_sec = tv32->tv_sec, .tv_usec =...
compat/time32/select_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <semaphore.h> int __sem_timedwait_time32(sem_t *sem, const struct timespec32 *restrict ts32) { return sem_timedwait(sem, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/sem_timedwait_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #define _GNU_SOURCE #include <sys/sem.h> #include <time.h> int __semtimedop_time32(int id, struct sembuf *buf, size_t n, const struct timespec32 *ts32) { return semtimedop(id, buf, n, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/semtimedop_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/time.h> int __setitimer_time32(int which, const struct itimerval32 *restrict new32, struct itimerval32 *restrict old32) { struct itimerval old; int r = setitimer(which, (&(struct itimerval){ .it_interval.tv_sec = new32->it_interval.tv_sec, .it_interval.tv_usec ...
compat/time32/setitimer_time32.c
null
null
null
null
null
source
musl
#define _BSD_SOURCE #include "time32.h" #include <sys/time.h> int __settimeofday_time32(const struct timeval32 *tv32, const void *tz) { return settimeofday(!tv32 ? 0 : (&(struct timeval){ .tv_sec = tv32->tv_sec, .tv_usec = tv32->tv_usec}), 0); }
compat/time32/settimeofday_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <signal.h> int __sigtimedwait_time32(const sigset_t *restrict set, siginfo_t *restrict si, const struct timespec32 *restrict ts32) { return sigtimedwait(set, si, !ts32 ? 0 : (&(struct timespec){ .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec})); }
compat/time32/sigtimedwait_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <string.h> #include <sys/stat.h> #include <stddef.h> struct stat32; int __stat_time32(const char *restrict path, struct stat32 *restrict st32) { struct stat st; int r = stat(path, &st); if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim)); return r; }
compat/time32/stat_time32.c
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> int __stime32(const time32_t *t) { return stime(&(time_t){*t}); }
compat/time32/stime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <threads.h> #include <errno.h> int __thrd_sleep_time32(const struct timespec32 *req32, struct timespec32 *rem32) { struct timespec rem; int ret = thrd_sleep((&(struct timespec){ .tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem); if (ret<0 && errno==EINTR &&...
compat/time32/thrd_sleep_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <errno.h> #include <stdint.h> time32_t __time32(time32_t *p) { time_t t = time(0); if (t < INT32_MIN || t > INT32_MAX) { errno = EOVERFLOW; return -1; } if (p) *p = t; return t; }
compat/time32/time32.c
null
null
null
null
null
source
musl
#ifndef TIME32_H #define TIME32_H #include <sys/types.h> typedef long time32_t; struct timeval32 { long tv_sec; long tv_usec; }; struct itimerval32 { struct timeval32 it_interval; struct timeval32 it_value; }; struct timespec32 { long tv_sec; long tv_nsec; }; struct itimerspec32 { struct timespec32 it_inte...
compat/time32/time32.h
null
null
null
null
null
source
musl
#define _GNU_SOURCE #include "time32.h" #include <time.h> #include <errno.h> #include <stdint.h> time32_t __time32gm(struct tm *tm) { time_t t = timegm(tm); if (t < INT32_MIN || t > INT32_MAX) { errno = EOVERFLOW; return -1; } return t; }
compat/time32/time32gm.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> int __timer_gettime32(timer_t t, struct itimerspec32 *val32) { struct itimerspec old; int r = timer_gettime(t, &old); if (r) return r; /* No range checking for consistency with settime */ val32->it_interval.tv_sec = old.it_interval.tv_sec; val32->it_interval.tv_nsec = old.it...
compat/time32/timer_gettime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> int __timer_settime32(timer_t t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32) { struct itimerspec old; int r = timer_settime(t, flags, (&(struct itimerspec){ .it_interval.tv_sec = val32->it_interval.tv_sec, .it_interval.tv_nsec =...
compat/time32/timer_settime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/timerfd.h> int __timerfd_gettime32(int t, struct itimerspec32 *val32) { struct itimerspec old; int r = timerfd_gettime(t, &old); if (r) return r; /* No range checking for consistency with settime */ val32->it_interval.tv_sec = old.it_interval.tv_sec; val32->it_...
compat/time32/timerfd_gettime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/timerfd.h> int __timerfd_settime32(int t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32) { struct itimerspec old; int r = timerfd_settime(t, flags, (&(struct itimerspec){ .it_interval.tv_sec = val32->it_interval.tv_sec,...
compat/time32/timerfd_settime32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <errno.h> #include <stdint.h> int __timespec_get_time32(struct timespec32 *ts32, int base) { struct timespec ts; int r = timespec_get(&ts, base); if (!r) return r; if (ts.tv_sec < INT32_MIN || ts.tv_sec > INT32_MAX) { errno = EOVERFLOW; return 0; } ts32->tv_sec ...
compat/time32/timespec_get_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <utime.h> struct utimbuf32 { time32_t actime; time32_t modtime; }; int __utime_time32(const char *path, const struct utimbuf32 *times32) { return utime(path, !times32 ? 0 : (&(struct utimbuf){ .actime = times32->actime, .modtime = times32->modtime})); }
compat/time32/utime_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/stat.h> int __utimensat_time32(int fd, const char *path, const struct timespec32 times32[2], int flags) { return utimensat(fd, path, !times32 ? 0 : ((struct timespec[2]){ {.tv_sec = times32[0].tv_sec,.tv_nsec = times32[0].tv_nsec}, {.tv_sec = times32[1].tv_sec,....
compat/time32/utimensat_time32.c
null
null
null
null
null
source
musl
#include "time32.h" #include <time.h> #include <sys/time.h> #include <sys/stat.h> int __utimes_time32(const char *path, const struct timeval32 times32[2]) { return utimes(path, !times32 ? 0 : ((struct timeval[2]){ {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec}, {.tv_sec = times32[1].tv_sec,.tv_usec =...
compat/time32/utimes_time32.c
null
null
null
null
null
source
musl
#define _BSD_SOURCE #include "time32.h" #include <string.h> #include <stddef.h> #include <sys/wait.h> struct compat_rusage { struct timeval32 ru_utime; struct timeval32 ru_stime; long ru_maxrss; long ru_ixrss; long ru_idrss; long ru_isrss; long ru_minflt; long ru_majflt; long ru_nswap; long ru_inblock; long...
compat/time32/wait3_time32.c
null
null
null
null
null
source
musl
#define _BSD_SOURCE #include "time32.h" #include <string.h> #include <stddef.h> #include <sys/wait.h> struct compat_rusage { struct timeval32 ru_utime; struct timeval32 ru_stime; long ru_maxrss; long ru_ixrss; long ru_idrss; long ru_isrss; long ru_minflt; long ru_majflt; long ru_nswap; long ru_inblock; long...
compat/time32/wait4_time32.c
null
null
null
null
null
source
musl
#include <features.h> #include "libc.h" #define START "_start" #include "crt_arch.h" int main(); weak void _init(); weak void _fini(); int __libc_start_main(int (*)(), int, char **, void (*)(), void(*)(), void(*)()); hidden void _start_c(long *p) { int argc = p[0]; char **argv = (void *)(p+1); __libc_start_main...
crt/crt1.c
null
null
null
null
null
source
musl
#define START "_start" #define _dlstart_c _start_c #include "../ldso/dlstart.c" int main(); weak void _init(); weak void _fini(); int __libc_start_main(int (*)(), int, char **, void (*)(), void(*)(), void(*)()); hidden void __dls2(unsigned char *base, size_t *sp) { __libc_start_main(main, *sp, (void *)(sp+1), _init...
crt/rcrt1.c
null
null
null
null
null
source
musl
.section .init .global _init .type _init,%function .align 2 _init: stp x29,x30,[sp,-16]! mov x29,sp .section .fini .global _fini .type _fini,%function .align 2 _fini: stp x29,x30,[sp,-16]! mov x29,sp
crt/aarch64/crti.s
null
null
null
null
null
source
musl
.syntax unified .section .init .global _init .type _init,%function .align 2 _init: push {r0,lr} .section .fini .global _fini .type _fini,%function .align 2 _fini: push {r0,lr}
crt/arm/crti.s
null
null
null
null
null
source
musl
.section .init .global _init _init: sub $12,%esp .section .fini .global _fini _fini: sub $12,%esp
crt/i386/crti.s
null
null
null
null
null
source
musl
.section .init .global _init .align 2 _init: addi r1, r1, -32 swi r15, r1, 0 .section .fini .global _fini .align 2 _fini: addi r1, r1, -32 swi r15, r1, 0
crt/microblaze/crti.s
null
null
null
null
null
source
musl
.section .init lwi r15, r1, 0 rtsd r15, 8 addi r1, r1, 32 .section .fini lwi r15, r1, 0 rtsd r15, 8 addi r1, r1, 32
crt/microblaze/crtn.s
null
null
null
null
null
source
musl
.set noreorder .section .init .global _init .type _init,@function .align 2 _init: subu $sp,$sp,32 sw $gp,24($sp) sw $ra,28($sp) .section .fini .global _fini .type _fini,@function .align 2 _fini: subu $sp,$sp,32 sw $gp,24($sp) sw $ra,28($sp)
crt/mips/crti.s
null
null
null
null
null
source
musl
.set noreorder .section .init lw $gp,24($sp) lw $ra,28($sp) jr $ra addu $sp,$sp,32 .section .fini lw $gp,24($sp) lw $ra,28($sp) jr $ra addu $sp,$sp,32
crt/mips/crtn.s
null
null
null
null
null
source
musl
.set noreorder .section .init .global _init .align 3 _init: dsubu $sp, $sp, 32 sd $gp, 16($sp) sd $ra, 24($sp) .section .fini .global _fini .align 3 _fini: dsubu $sp, $sp, 32 sd $gp, 16($sp) sd $ra, 24($sp)
crt/mips64/crti.s
null
null
null
null
null
source
musl
.set noreorder .section .init ld $gp,16($sp) ld $ra,24($sp) jr $ra daddu $sp,$sp,32 .section .fini ld $gp,16($sp) ld $ra,24($sp) jr $ra daddu $sp,$sp,32
crt/mips64/crtn.s
null
null
null
null
null
source
musl
.set noreorder .section .init .global _init .type _init,@function .align 2 _init: subu $sp, $sp, 32 sd $gp, 16($sp) sd $ra, 24($sp) .section .fini .global _fini .type _fini,@function .align 2 _fini: subu $sp, $sp, 32 sd $gp, 16($sp) sd $ra, 24($sp)
crt/mipsn32/crti.s
null
null
null
null
null
source
musl
.set noreorder .section .init ld $gp, 16($sp) ld $ra, 24($sp) jr $ra addu $sp, $sp, 32 .section .fini ld $gp, 16($sp) ld $ra, 24($sp) jr $ra addu $sp, $sp, 32
crt/mipsn32/crtn.s
null
null
null
null
null
source
musl
.section .init .global _init _init: l.addi r1,r1,-4 l.sw 0(r1),r9 .section .fini .global _fini _fini: l.addi r1,r1,-4 l.sw 0(r1),r9
crt/or1k/crti.s
null
null
null
null
null
source
musl
.section .init l.lwz r9,0(r1) l.jr r9 l.addi r1,r1,4 .section .fini l.lwz r9,0(r1) l.jr r9 l.addi r1,r1,4
crt/or1k/crtn.s
null
null
null
null
null
source
musl
.section .init .align 2 .global _init _init: stwu 1,-32(1) mflr 0 stw 0,36(1) .section .fini .align 2 .global _fini _fini: stwu 1,-32(1) mflr 0 stw 0,36(1)
crt/powerpc/crti.s
null
null
null
null
null
source
musl
.section .init .align 2 lwz 0,36(1) addi 1,1,32 mtlr 0 blr .section .fini .align 2 lwz 0,36(1) addi 1,1,32 mtlr 0 blr
crt/powerpc/crtn.s
null
null
null
null
null
source
musl
.section .init .align 2 .global _init _init: addis 2, 12, .TOC.-_init@ha addi 2, 2, .TOC.-_init@l .localentry _init,.-_init mflr 0 std 0, 16(1) stdu 1,-32(1) .section .fini .align 2 .global _fini _fini: addis 2, 12, .TOC.-_fini@ha addi 2, 2, .TOC.-_fini@l .localentry _fini,.-_fini mflr 0 std 0, 16(1) ...
crt/powerpc64/crti.s
null
null
null
null
null
source
musl
.section .init .align 2 addi 1, 1, 32 ld 0, 16(1) mtlr 0 blr .section .fini .align 2 addi 1, 1, 32 ld 0, 16(1) mtlr 0 blr
crt/powerpc64/crtn.s
null
null
null
null
null
source
musl
.section .init .align 2 .global _init _init: stmg %r14, %r15, 112(%r15) lgr %r0, %r15 aghi %r15, -160 stg %r0, 0(%r15) .section .fini .align 2 .global _fini _fini: stmg %r14, %r15, 112(%r15) lgr %r0, %r15 aghi %r15, -160 stg %r0, 0(%r15)
crt/s390x/crti.s
null
null
null
null
null
source
musl
.section .init .align 2 lmg %r14, %r15, 272(%r15) br %r14 .section .fini .align 2 lmg %r14, %r15, 272(%r15) br %r14
crt/s390x/crtn.s
null
null
null
null
null
source
musl
.section .init .global _init .type _init, @function _init: add #-4, r15 mov.l r12, @-r15 mov.l r14, @-r15 sts.l pr, @-r15 mov r15, r14 nop .section .fini .global _fini .type _fini, @function _fini: add #-4, r15 mov.l r12, @-r15 mov.l r14, @-r15 sts.l pr, @-r15 mov r15, r14 nop
crt/sh/crti.s
null
null
null
null
null
source
musl
.section .init lds.l @r15+, pr mov.l @r15+, r14 mov.l @r15+, r12 rts add #4, r15 .section .fini lds.l @r15+, pr mov.l @r15+, r14 mov.l @r15+, r12 rts add #4, r15
crt/sh/crtn.s
null
null
null
null
null
source
musl
#ifndef _AIO_H #define _AIO_H #ifdef __cplusplus extern "C" { #endif #include <features.h> #include <signal.h> #include <time.h> #define __NEED_ssize_t #define __NEED_off_t #include <bits/alltypes.h> struct aiocb { int aio_fildes, aio_lio_opcode, aio_reqprio; volatile void *aio_buf; size_t aio_nbytes; struct s...
include/aio.h
null
null
null
null
null
source
musl
#ifndef _ALLOCA_H #define _ALLOCA_H #ifdef __cplusplus extern "C" { #endif #define __NEED_size_t #include <bits/alltypes.h> void *alloca(size_t); #define alloca __builtin_alloca #ifdef __cplusplus } #endif #endif
include/alloca.h
null
null
null
null
null
source
musl
#ifndef _AR_H #define _AR_H #ifdef __cplusplus extern "C" { #endif #define ARMAG "!<arch>\n" #define SARMAG 8 #define ARFMAG "`\n" struct ar_hdr { char ar_name[16]; char ar_date[12]; char ar_uid[6], ar_gid[6]; char ar_mode[8]; char ar_size[10]; char ar_fmag[2]; }; #ifdef __cplusplus } #endif #endif
include/ar.h
null
null
null
null
null