Changeset d2bb25e7 in mainline for uspace/lib/c/generic/tls.c
- Timestamp:
- 2016-05-17T22:51:37Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c07c3d
- Parents:
- e2f26002
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/tls.c
re2f26002 rd2bb25e7 97 97 void tls_free(tcb_t *tcb) 98 98 { 99 free(tcb->dtv); 99 100 tls_free_arch(tcb, tls_get_size()); 100 101 } … … 109 110 tcb_t *tls_alloc_variant_1(void **data, size_t size) 110 111 { 111 tcb_t * result;112 tcb_t *tcb; 112 113 113 result= malloc(sizeof(tcb_t) + size);114 if (! result)114 tcb = malloc(sizeof(tcb_t) + size); 115 if (!tcb) 115 116 return NULL; 116 *data = ((void *)result) + sizeof(tcb_t); 117 *data = ((void *)tcb) + sizeof(tcb_t); 118 tcb->dtv = NULL; 117 119 118 return result;120 return tcb; 119 121 } 120 122 … … 147 149 tcb = (tcb_t *) (*data + size); 148 150 tcb->self = tcb; 151 tcb->dtv = NULL; 149 152 150 153 return tcb;
Note:
See TracChangeset
for help on using the changeset viewer.