Changeset 2b95d13 in mainline for uspace/lib/c/generic/fibril.c


Ignore:
Timestamp:
2013-03-12T21:07:15Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
606f6a1
Parents:
976c434 (diff), eceff5f (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r976c434 r2b95d13  
    9595fibril_t *fibril_setup(void)
    9696{
    97         tcb_t *tcb = __make_tls();
     97        tcb_t *tcb = tls_make();
    9898        if (!tcb)
    9999                return NULL;
     
    101101        fibril_t *fibril = malloc(sizeof(fibril_t));
    102102        if (!fibril) {
    103                 __free_tls(tcb);
     103                tls_free(tcb);
    104104                return NULL;
    105105        }
     
    122122void fibril_teardown(fibril_t *fibril)
    123123{
    124         __free_tls(fibril->tcb);
     124        tls_free(fibril->tcb);
    125125        free(fibril);
    126126}
     
    256256 * @param func Implementing function of the new fibril.
    257257 * @param arg Argument to pass to func.
     258 * @param stksz Stack size in bytes.
    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 == FIBRIL_DFLT_STK_SIZE) ?
     272            stack_size_get() : stksz;
    271273        fibril->stack = as_area_create((void *) -1, stack_size,
    272274            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD |
Note: See TracChangeset for help on using the changeset viewer.