Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset d8cb48d in mainline


Ignore:
Timestamp:
2019-01-20T15:59:17Z (2 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
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)
Message:

Remove FIBRIL_DFLT_STK_SIZE macro

Location:
uspace/lib/c
Files:
2 edited

Legend:

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

    r4f13e19 rd8cb48d  
    550550                return 0;
    551551
    552         fibril->stack_size = (stksz == FIBRIL_DFLT_STK_SIZE) ?
    553             stack_size_get() : stksz;
     552        fibril->stack_size = stksz;
    554553        fibril->stack = as_area_create(AS_AREA_ANY, fibril->stack_size,
    555554            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD |
     
    572571        context_create(&fibril->ctx, &sctx);
    573572        return (fid_t) fibril;
     573}
     574
     575fid_t fibril_create(errno_t (*func)(void *), void *arg)
     576{
     577        return fibril_create_generic(func, arg, stack_size_get());
    574578}
    575579
  • uspace/lib/c/include/fibril.h

    r4f13e19 rd8cb48d  
    4949typedef fibril_t *fid_t;
    5050
     51#ifndef __cplusplus
    5152/** Fibril-local variable specifier */
    5253#define fibril_local __thread
    53 
    54 #define FIBRIL_DFLT_STK_SIZE    0
     54#endif
    5555
    5656extern fid_t fibril_create_generic(errno_t (*)(void *), void *, size_t);
     57extern fid_t fibril_create(errno_t (*)(void *), void *);
    5758extern void fibril_destroy(fid_t);
    5859extern void fibril_add_ready(fid_t);
     
    6869extern void fibril_detach(fid_t fid);
    6970
    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 
    7571extern void fibril_start(fid_t);
    7672extern __noreturn void fibril_exit(long);
Note: See TracChangeset for help on using the changeset viewer.