Changeset 6b781c0 in mainline for uspace/libc/arch/arm32/src/thread.c
- Timestamp:
- 2007-06-08T15:02:49Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c03ee1c
- Parents:
- 3ee8a075
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/libc/arch/arm32/src/thread.c
r3ee8a075 r6b781c0 1 1 /* 2 * Copyright (c) 200 6 Ondrej Palkovsky2 * Copyright (c) 2007 Pavel Jancik 3 3 * All rights reserved. 4 4 * … … 33 33 */ 34 34 /** @file 35 * @brief Uspace threads and TLS. 35 36 */ 36 37 … … 38 39 #include <malloc.h> 39 40 40 /** Allocate TLS & TCB for initial module threads41 /** Allocates TLS & TCB. 41 42 * 42 * @param data Start of data section 43 * @return pointer to tcb_t structure 43 * @param data Start of data section (output parameter). 44 * @param size Size of (tbss + tdata) sections. 45 * @return Pointer to the allocated #tcb_t structure. 44 46 */ 45 47 tcb_t * __alloc_tls(void **data, size_t size) 46 48 { 47 /* TODO */ 48 return NULL; 49 tcb_t *result; 50 51 result = malloc(sizeof(tcb_t) + size); 52 *data = ((void *)result) + sizeof(tcb_t); 53 return result; 49 54 } 50 55 56 /** Deallocates TLS & TCB. 57 * 58 * @param tcb TCB structure to be deallocated (along with corresponding TLS). 59 * @param size Not used. 60 */ 51 61 void __free_tls_arch(tcb_t *tcb, size_t size) 52 62 { 53 /* TODO */63 free(tcb); 54 64 } 55 65
Note:
See TracChangeset
for help on using the changeset viewer.