Changeset b4df8db in mainline for uspace/lib/c/generic/fibril.c


Ignore:
Timestamp:
2013-03-11T19:48:41Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
623bab8f
Parents:
e4d96e9
Message:

Allow user-specified fibril stack sizes.

  • Let the interrupt fibrils in the i8042 task use small stacks.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/fibril.c

    re4d96e9 rb4df8db  
    256256 * @param func Implementing function of the new fibril.
    257257 * @param arg Argument to pass to func.
     258 * @param stksz Stack size, -1 for the system default stack size.
    258259 *
    259260 * @return 0 on failure or TLS of the new fibril.
    260261 *
    261262 */
    262 fid_t fibril_create(int (*func)(void *), void *arg)
     263fid_t fibril_create_generic(int (*func)(void *), void *arg, size_t stksz)
    263264{
    264265        fibril_t *fibril;
     
    268269                return 0;
    269270       
    270         size_t stack_size = stack_size_get();
     271        size_t stack_size = (stksz == (size_t) -1) ? stack_size_get() : stksz;
    271272        fibril->stack = as_area_create((void *) -1, stack_size,
    272273            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD |
Note: See TracChangeset for help on using the changeset viewer.