Ignore:
Timestamp:
2010-01-07T19:06:59Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8190e63
Parents:
743e17b (diff), eca2435 (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 moved

Legend:

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

    r743e17b r985e26d2  
    11/*
    2  * Copyright (c) 2005 Jakub Jermar
     2 * Copyright (c) 2006 Ondrej Palkovsky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef KERN_mips32_ARG_H_
    36 #define KERN_mips32_ARG_H_
     35#ifndef LIBC_ASYNC_PRIV_H_
     36#define LIBC_ASYNC_PRIV_H_
    3737
    38 #include <arch/types.h>
     38#include <adt/list.h>
     39#include <fibril.h>
     40#include <sys/time.h>
     41#include <bool.h>
    3942
    40 /**
    41  * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)
    42  * To satisfy this, paddings must be sometimes inserted.
    43  */
     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;
    4453
    45 typedef uintptr_t va_list;
     54        /** Expiration time. */
     55        struct timeval expires;
     56} to_event_t;
    4657
    47 #define va_start(ap, lst) \
    48         ((ap) = (va_list)&(lst) + sizeof(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;
    4966
    50 #define va_arg(ap, type)        \
    51         (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uintptr_t)((ap) + 2*4 - 1) & (~3)) : ((uintptr_t)((ap) + 2*8 -1) & (~7)) )))[-1])
    5267
    53 #define va_copy(dst,src) ((dst)=(src))
     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;
    5475
    55 #define va_end(ap)
     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);
    5683
    5784#endif
Note: See TracChangeset for help on using the changeset viewer.