Changeset 06b0211b in mainline for uspace/lib/c/generic/fibril.c
- Timestamp:
- 2013-04-29T11:29:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa2b32c
- Parents:
- ba4799a (diff), df956b9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/fibril.c
rba4799a r06b0211b 95 95 fibril_t *fibril_setup(void) 96 96 { 97 tcb_t *tcb = __make_tls();97 tcb_t *tcb = tls_make(); 98 98 if (!tcb) 99 99 return NULL; … … 101 101 fibril_t *fibril = malloc(sizeof(fibril_t)); 102 102 if (!fibril) { 103 __free_tls(tcb);103 tls_free(tcb); 104 104 return NULL; 105 105 } … … 122 122 void fibril_teardown(fibril_t *fibril) 123 123 { 124 __free_tls(fibril->tcb);124 tls_free(fibril->tcb); 125 125 free(fibril); 126 126 } … … 256 256 * @param func Implementing function of the new fibril. 257 257 * @param arg Argument to pass to func. 258 * @param stksz Stack size in bytes. 258 259 * 259 260 * @return 0 on failure or TLS of the new fibril. 260 261 * 261 262 */ 262 fid_t fibril_create (int (*func)(void *), void *arg)263 fid_t fibril_create_generic(int (*func)(void *), void *arg, size_t stksz) 263 264 { 264 265 fibril_t *fibril; … … 268 269 return 0; 269 270 270 size_t stack_size = stack_size_get(); 271 size_t stack_size = (stksz == FIBRIL_DFLT_STK_SIZE) ? 272 stack_size_get() : stksz; 271 273 fibril->stack = as_area_create((void *) -1, stack_size, 272 274 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD |
Note:
See TracChangeset
for help on using the changeset viewer.