Changeset 74359c6 in mainline for uspace/libc/arch
- Timestamp:
- 2006-12-30T13:36:13Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 33c0c649
- Parents:
- 66eb2c8
- Location:
- uspace/libc/arch/sparc64
- Files:
-
- 3 edited
-
include/thread.h (modified) (1 diff)
-
src/psthread.S (modified) (1 diff)
-
src/thread.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/libc/arch/sparc64/include/thread.h
r66eb2c8 r74359c6 34 34 * @file 35 35 * @brief sparc64 TLS functions. 36 *37 * The implementation is based on the IA-32 implementation which was also38 * designed by Sun and is virtually the same, except the TCB is stored in39 * %g7 (of the normal set).40 36 */ 41 37 -
uspace/libc/arch/sparc64/src/psthread.S
r66eb2c8 r74359c6 29 29 #include <libarch/context_offset.h> 30 30 31 /**32 * Both context_save_arch() and context_restore_arch() are33 * leaf-optimized procedures. This kind of optimization34 * is very important and prevents any implicit window35 * spill/fill/clean traps in these very core kernel36 * functions.37 */38 39 31 .text 40 32 -
uspace/libc/arch/sparc64/src/thread.c
r66eb2c8 r74359c6 38 38 #include <malloc.h> 39 39 40 /** Allocate TLS & TCB for initial module threads 40 /* 41 * sparc64 uses thread-local storage data structures, variant II, as described 42 * in: 43 * Drepper U.: ELF Handling For Thread-Local Storage, 2005 44 */ 45 46 /** Allocate TLS variant II data structures for a thread. 41 47 * 42 * @param data Start of data section 43 * @return pointer to tcb_t structure 48 * Only static model is supported. 49 * 50 * @param data Pointer to pointer to thread local data. This is actually an 51 * output argument. 52 * @param size Size of thread local data. 53 * @return Pointer to TCB structure. 44 54 */ 45 55 tcb_t * __alloc_tls(void **data, size_t size) … … 55 65 } 56 66 67 /** Free TLS variant II data structures of a thread. 68 * 69 * Only static model is supported. 70 * 71 * @param tcb Pointer to TCB structure. 72 * @param size Size of thread local data. 73 */ 57 74 void __free_tls_arch(tcb_t *tcb, size_t size) 58 75 { 59 void *start = ((void *) tcb) - size;76 void *start = ((void *) tcb) - size; 60 77 free(start); 61 78 }
Note:
See TracChangeset
for help on using the changeset viewer.
