Changeset 116d3f6f in mainline for uspace/lib/libc/generic/async.c


Ignore:
Timestamp:
2007-10-03T06:55:56Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18525c5
Parents:
5b5d25f
Message:

Rename fibril_schedule_next_adv() to fibril_switch(). Rename
fibril_schedule_next() to fibril_yield(). Some fibril structures could be
uninitialized, set them to zero in fibril_setup(). For some fibrils, the stack
member can be NULL (e.g. every thread's first/main fibril); don't do free on
these stacks when cleaning up after a dead fibril.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/async.c

    r5b5d25f r116d3f6f  
    363363                 * case, route_call() will perform the wakeup.
    364364                 */
    365                 fibril_schedule_next_adv(FIBRIL_TO_MANAGER);
     365                fibril_switch(FIBRIL_TO_MANAGER);
    366366                /*
    367367                 * Futex is up after getting back from async_manager get it
     
    585585
    586586        while (1) {
    587                 if (fibril_schedule_next_adv(FIBRIL_FROM_MANAGER)) {
     587                if (fibril_switch(FIBRIL_FROM_MANAGER)) {
    588588                        futex_up(&async_futex);
    589589                        /*
     
    804804        msg->wdata.inlist = 0;
    805805        /* Leave the async_futex locked when entering this function */
    806         fibril_schedule_next_adv(FIBRIL_TO_MANAGER);
    807         /* futex is up automatically after fibril_schedule_next...*/
     806        fibril_switch(FIBRIL_TO_MANAGER);
     807        /* futex is up automatically after fibril_switch...*/
    808808done:
    809809        if (retval)
     
    843843
    844844        /* Leave the async_futex locked when entering this function */
    845         fibril_schedule_next_adv(FIBRIL_TO_MANAGER);
    846         /* futex is up automatically after fibril_schedule_next...*/
     845        fibril_switch(FIBRIL_TO_MANAGER);
     846        /* futex is up automatically after fibril_switch...*/
    847847
    848848        if (!msg->done)
     
    885885        insert_timeout(&msg->wdata);
    886886        /* Leave the async_futex locked when entering this function */
    887         fibril_schedule_next_adv(FIBRIL_TO_MANAGER);
    888         /* futex is up automatically after fibril_schedule_next_adv()...*/
     887        fibril_switch(FIBRIL_TO_MANAGER);
     888        /* futex is up automatically after fibril_switch()...*/
    889889        free(msg);
    890890}
Note: See TracChangeset for help on using the changeset viewer.