Changeset d8cb48d in mainline
- Timestamp:
- 2019-01-20T15:59:17Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 57264ac3
- Parents:
- 4f13e19
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-01-19 16:59:10)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-01-20 15:59:17)
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/thread/fibril.c
r4f13e19 rd8cb48d 550 550 return 0; 551 551 552 fibril->stack_size = (stksz == FIBRIL_DFLT_STK_SIZE) ? 553 stack_size_get() : stksz; 552 fibril->stack_size = stksz; 554 553 fibril->stack = as_area_create(AS_AREA_ANY, fibril->stack_size, 555 554 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD | … … 572 571 context_create(&fibril->ctx, &sctx); 573 572 return (fid_t) fibril; 573 } 574 575 fid_t fibril_create(errno_t (*func)(void *), void *arg) 576 { 577 return fibril_create_generic(func, arg, stack_size_get()); 574 578 } 575 579 -
uspace/lib/c/include/fibril.h
r4f13e19 rd8cb48d 49 49 typedef fibril_t *fid_t; 50 50 51 #ifndef __cplusplus 51 52 /** Fibril-local variable specifier */ 52 53 #define fibril_local __thread 53 54 #define FIBRIL_DFLT_STK_SIZE 0 54 #endif 55 55 56 56 extern fid_t fibril_create_generic(errno_t (*)(void *), void *, size_t); 57 extern fid_t fibril_create(errno_t (*)(void *), void *); 57 58 extern void fibril_destroy(fid_t); 58 59 extern void fibril_add_ready(fid_t); … … 68 69 extern void fibril_detach(fid_t fid); 69 70 70 static inline fid_t fibril_create(errno_t (*func)(void *), void *arg)71 {72 return fibril_create_generic(func, arg, FIBRIL_DFLT_STK_SIZE);73 }74 75 71 extern void fibril_start(fid_t); 76 72 extern __noreturn void fibril_exit(long);
Note:
See TracChangeset
for help on using the changeset viewer.