source: trunk/sys/dietlibc/errno_location.c @ 126

Last change on this file since 126 was 1, checked in by alain, 8 years ago

First import

File size: 236 bytes
RevLine 
[1]1#include <pthread.h>
2#include <cpu-syscall.h>
3
4int *__errno_location(void) __attribute__((weak));
5int *__errno_location()
6{
7  __pthread_tls_t *tls;
8  tls = cpu_get_tls();
9  return (int*)__pthread_tls_getlocation(tls,__PT_TLS_ERRNO);
10}
11
Note: See TracBrowser for help on using the repository browser.