forked from KolibriOS/kolibrios
ddk: 3.19-rc1
git-svn-id: svn://kolibrios.org@5270 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
#ifndef _LINUX_WAIT_H
|
||||
#define _LINUX_WAIT_H
|
||||
|
||||
|
||||
/*
|
||||
* Linux wait queue related types and methods
|
||||
*/
|
||||
#include <linux/list.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <asm/current.h>
|
||||
|
||||
|
||||
|
||||
#include <syscall.h>
|
||||
|
||||
typedef struct __wait_queue wait_queue_t;
|
||||
@@ -28,6 +35,10 @@ static inline int waitqueue_active(wait_queue_head_t *q)
|
||||
return !list_empty(&q->task_list);
|
||||
}
|
||||
|
||||
extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
|
||||
extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait);
|
||||
extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
|
||||
|
||||
static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
|
||||
{
|
||||
list_add(&new->task_list, &head->task_list);
|
||||
@@ -145,10 +156,10 @@ init_waitqueue_head(wait_queue_head_t *q)
|
||||
};
|
||||
|
||||
|
||||
struct completion {
|
||||
unsigned int done;
|
||||
wait_queue_head_t wait;
|
||||
};
|
||||
//struct completion {
|
||||
// unsigned int done;
|
||||
// wait_queue_head_t wait;
|
||||
//};
|
||||
|
||||
int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
|
||||
|
||||
|
Reference in New Issue
Block a user