Changeset 1107050 in mainline for uspace/lib/c/generic/fibril.c
- Timestamp:
- 2012-11-06T22:56:02Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9a9c805
- Parents:
- 692bd3f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/fibril.c
r692bd3f2 r1107050 39 39 #include <tls.h> 40 40 #include <malloc.h> 41 #include <abi/mm/as.h> 42 #include <as.h> 41 43 #include <unistd.h> 42 44 #include <stdio.h> … … 195 197 * stack member filled. 196 198 */ 197 free(stack);199 as_area_destroy(stack); 198 200 } 199 201 fibril_teardown(srcf->clean_after_me); … … 269 271 return 0; 270 272 271 fibril->stack = 272 (char *) malloc(FIBRIL_INITIAL_STACK_PAGES_NO * getpagesize()); 273 if (!fibril->stack) { 273 fibril->stack = as_area_create((void *) -1, 274 FIBRIL_INITIAL_STACK_PAGES_NO * getpagesize(), 275 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD | 276 AS_AREA_NORESERVE); 277 if (fibril->stack == (void *) -1) { 274 278 fibril_teardown(fibril); 275 279 return 0; … … 298 302 fibril_t *fibril = (fibril_t *) fid; 299 303 300 free(fibril->stack);304 as_area_destroy(fibril->stack); 301 305 fibril_teardown(fibril); 302 306 }
Note:
See TracChangeset
for help on using the changeset viewer.