Changeset b9641ee in mainline for uspace/lib/libc/include/psthread.h


Ignore:
Timestamp:
2007-06-27T23:12:25Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc1f1c2
Parents:
72381f1
Message:
  1. Implement simple joining of pseudo threads. Only one pseudo thread is allowed to join another pseudo

thread. The restriction is that both pseudo threads must be from the same thread (this is to simplify
synchronization). The joiner doesn't free anything from the joinee. It only gets its return value. Not
tested thoroughly yet.

  1. Cleanup of a dead pseudo thread is done by the next scheduled pseudo thread. Not tested thoroughly yet.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/include/psthread.h

    r72381f1 rb9641ee  
    5050
    5151typedef enum {
     52        PS_SLEEP,
     53        PS_PREEMPT,
    5254        PS_TO_MANAGER,
    5355        PS_FROM_MANAGER,
    54         PS_PREEMPT,
    5556        PS_FROM_DEAD
    5657} pschange_type;
     
    6667        tcb_t *tcb;
    6768
    68         struct psthread_data *waiter;
    69         int finished;
     69        struct psthread_data *clean_after_me;
     70        struct psthread_data *joiner;
     71        int joinee_retval;
    7072        int retval;
    7173        int flags;
     
    8890void psthread_dec_sercount(void);
    8991
    90 static inline int psthread_schedule_next() {
     92static inline int psthread_schedule_next(void) {
    9193        return psthread_schedule_next_adv(PS_PREEMPT);
    9294}
    93 
    9495
    9596#endif
Note: See TracChangeset for help on using the changeset viewer.