Ignore:
Timestamp:
2009-11-16T21:22:54Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ebdf94
Parents:
fcbd1be (diff), 9c70ed6 (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:

merged with head (unstable)

File:
1 moved

Legend:

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

    rfcbd1be r1787e527  
    11/*
    2  * Copyright (c) 2005 Jakub Jermar
     2 * Copyright (c) 2006 Ondrej Palkovsky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libcia32
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 /*
    36  * Variable argument list manipulation macros
    37  * for architectures using stack to pass arguments.
    38  */
    39  
    40 #ifndef LIBC_ia32_STACKARG_H_
    41 #define LIBC_ia32_STACKARG_H_
     35#ifndef LIBC_ASYNC_PRIV_H_
     36#define LIBC_ASYNC_PRIV_H_
    4237
    43 #include <sys/types.h>
     38#include <adt/list.h>
     39#include <fibril.h>
     40#include <sys/time.h>
     41#include <bool.h>
    4442
    45 /* dont allow to define it second time in stdarg.h */
    46 #define __VARARGS_DEFINED
     43/** Structures of this type are used to track the timeout events. */
     44typedef struct {
     45        /** If true, this struct is in the timeout list. */
     46        bool inlist;
     47       
     48        /** Timeout list link. */
     49        link_t link;
     50       
     51        /** If true, we have timed out. */
     52        bool occurred;
    4753
    48 typedef struct va_list {
    49         int pos;
    50         uint8_t *last;
    51 } va_list;
     54        /** Expiration time. */
     55        struct timeval expires;
     56} to_event_t;
    5257
    53 #define va_start(ap, lst) \
    54         (ap).pos = sizeof(lst);                         \
    55         (ap).last = (uint8_t *) &(lst)
     58/** Structures of this type are used to track the wakeup events. */
     59typedef struct {
     60        /** If true, this struct is in a synchronization object wait queue. */
     61        bool inlist;
     62       
     63        /** Wait queue linkage. */
     64        link_t link;
     65} wu_event_t;
    5666
    57 #define va_arg(ap, type)                \
    58         (*((type *)((ap).last + ((ap).pos  += sizeof(type) ) - sizeof(type))))
    5967
    60 #define va_end(ap)
     68/** Structures of this type represent a waiting fibril. */
     69typedef struct {
     70        /** Identification of and link to the waiting fibril. */
     71        fid_t fid;
     72       
     73        /** If true, this fibril is currently active. */
     74        bool active;
    6175
     76        /** Timeout wait data. */
     77        to_event_t to_event;
     78        /** Wakeup wait data. */
     79        wu_event_t wu_event;
     80} awaiter_t;
     81
     82extern void async_insert_timeout(awaiter_t *wd);
    6283
    6384#endif
Note: See TracChangeset for help on using the changeset viewer.