Changes in uspace/lib/c/generic/tls.c [0d57c3e:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/tls.c
r0d57c3e r9d58539 42 42 #include <str.h> 43 43 #include <align.h> 44 #include <unistd.h>45 44 46 45 /** Create TLS (Thread Local Storage) data structures. … … 58 57 59 58 tcb = __alloc_tls(&data, tls_size); 60 if (!tcb)61 return NULL;62 59 63 60 /* … … 92 89 93 90 result = malloc(sizeof(tcb_t) + size); 94 if (!result)95 return NULL;96 91 *data = ((void *)result) + sizeof(tcb_t); 97 98 92 return result; 99 93 } … … 124 118 size = ALIGN_UP(size, &_tls_alignment); 125 119 *data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size); 126 if (!*data) 127 return NULL; 120 128 121 tcb = (tcb_t *) (*data + size); 129 122 tcb->self = tcb;
Note:
See TracChangeset
for help on using the changeset viewer.