2 * Async i/o definitions
4 * Copyright (C) 2000 Mike McCormack
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _SERVER_ASYNC_
22 #define _SERVER_ASYNC_
32 struct thread *thread;
37 struct timeout_user *timeout;
38 struct async *next,*prev;
39 struct async_queue *q;
48 void destroy_async( struct async *async );
49 void destroy_async_queue( struct async_queue *q );
50 void async_notify(struct async *async, int status);
51 struct async *find_async(struct async_queue *q, struct thread *thread, void *overlapped);
52 void async_insert(struct async_queue *q, struct async *async);
53 struct async *create_async(struct object *obj, struct thread *thread,
54 void *func, void *overlapped);
55 void async_add_timeout(struct async *async, int timeout);
56 static inline void init_async_queue(struct async_queue *q)
58 q->head = q->tail = NULL;
61 #define IS_READY(q) (((q).head) && ((q).head->status==STATUS_PENDING))
63 #endif /* _SERVER_ASYNC_ */