summaryrefslogtreecommitdiff
path: root/pfinet/glue-include
diff options
context:
space:
mode:
Diffstat (limited to 'pfinet/glue-include')
-rw-r--r--pfinet/glue-include/asm/spinlock.h2
-rw-r--r--pfinet/glue-include/linux/interrupt.h10
-rw-r--r--pfinet/glue-include/linux/sched.h14
-rw-r--r--pfinet/glue-include/linux/timer.h2
-rw-r--r--pfinet/glue-include/linux/wait.h8
5 files changed, 17 insertions, 19 deletions
diff --git a/pfinet/glue-include/asm/spinlock.h b/pfinet/glue-include/asm/spinlock.h
index 1666b0e2..ef13312d 100644
--- a/pfinet/glue-include/asm/spinlock.h
+++ b/pfinet/glue-include/asm/spinlock.h
@@ -1,8 +1,6 @@
#ifndef _HACK_ASM_SPINLOCK_H_
#define _HACK_ASM_SPINLOCK_H_
-#include <cthreads.h>
-
typedef struct { } spinlock_t;
#define SPIN_LOCK_UNLOCKED { }
diff --git a/pfinet/glue-include/linux/interrupt.h b/pfinet/glue-include/linux/interrupt.h
index 5f485e32..df58d2f4 100644
--- a/pfinet/glue-include/linux/interrupt.h
+++ b/pfinet/glue-include/linux/interrupt.h
@@ -14,13 +14,13 @@
#define start_bh_atomic() ((void) 0)
#define end_bh_atomic() ((void) 0)
/*
-extern struct mutex net_bh_lock;
-#define start_bh_atomic() __mutex_lock (&net_bh_lock)
-#define end_bh_atomic() __mutex_unlock (&net_bh_lock)
+extern pthread_mutex_t net_bh_lock;
+#define start_bh_atomic() pthread_mutex_lock (&net_bh_lock)
+#define end_bh_atomic() pthread_mutex_unlock (&net_bh_lock)
*/
/* See sched.c::net_bh_worker comments. */
-extern struct condition net_bh_wakeup;
+extern pthread_cond_t net_bh_wakeup;
#define NET_BH 0xb00bee51
@@ -30,7 +30,7 @@ static inline void
mark_bh (int bh)
{
assert (bh == NET_BH);
- condition_broadcast (&net_bh_wakeup);
+ pthread_cond_broadcast (&net_bh_wakeup);
}
void net_bh (void);
diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h
index d4cae42a..aea6c47a 100644
--- a/pfinet/glue-include/linux/sched.h
+++ b/pfinet/glue-include/linux/sched.h
@@ -7,7 +7,7 @@
#include <hurd/hurd_types.h>
#include <limits.h>
#include <assert.h>
-#include <cthreads.h>
+#include <pthread.h>
#include "mapped-time.h"
@@ -90,12 +90,12 @@ capable(int cap)
}
-extern struct mutex global_lock;
+extern pthread_mutex_t global_lock;
static inline void
interruptible_sleep_on (struct wait_queue **p)
{
- struct condition **condp = (void *) p, *c;
+ pthread_cond_t **condp = (void *) p, *c;
int isroot;
struct wait_queue **next_wait;
@@ -104,14 +104,14 @@ interruptible_sleep_on (struct wait_queue **p)
{
c = malloc (sizeof **condp);
assert (c);
- condition_init (c);
+ pthread_cond_init (c, NULL);
*condp = c;
}
isroot = current->isroot; /* This is our context that needs switched. */
next_wait = current->next_wait; /* This too, for multiple schedule calls. */
current->next_wait = 0;
- if (hurd_condition_wait (c, &global_lock))
+ if (pthread_hurd_cond_wait_np (c, &global_lock))
current->signal = 1; /* We got cancelled, mark it for later. */
current->isroot = isroot; /* Switch back to our context. */
current->next_wait = next_wait;
@@ -121,9 +121,9 @@ interruptible_sleep_on (struct wait_queue **p)
static inline void
wake_up_interruptible (struct wait_queue **p)
{
- struct condition **condp = (void *) p, *c = *condp;
+ pthread_cond_t **condp = (void *) p, *c = *condp;
if (c)
- condition_broadcast (c);
+ pthread_cond_broadcast (c);
}
#define wake_up wake_up_interruptible
diff --git a/pfinet/glue-include/linux/timer.h b/pfinet/glue-include/linux/timer.h
index cc8dec80..5497b109 100644
--- a/pfinet/glue-include/linux/timer.h
+++ b/pfinet/glue-include/linux/timer.h
@@ -1,7 +1,7 @@
#ifndef _HACK_TIMER_H_
#define _HACK_TIMER_H_
-#include <cthreads.h>
+#include <pthread.h>
enum tstate
{
diff --git a/pfinet/glue-include/linux/wait.h b/pfinet/glue-include/linux/wait.h
index 7ee962dc..58f4960e 100644
--- a/pfinet/glue-include/linux/wait.h
+++ b/pfinet/glue-include/linux/wait.h
@@ -1,14 +1,14 @@
#ifndef _HACK_WAIT_H_
#define _HACK_WAIT_H_
-#include <cthreads.h>
+#include <pthread.h>
/* This data structure actually represents one waiter on a wait queue,
and waiters always expect to initialize it with { current, NULL }.
The actual wait queue is a `struct wait_queue *' stored somewhere.
We ignore these structures provided by the waiters entirely.
In the `struct wait_queue *' that is the "head of the wait queue" slot,
- we actually store a `struct condition *' pointing to malloc'd storage. */
+ we actually store a `pthread_cond_t *' pointing to malloc'd storage. */
struct wait_queue
{
@@ -19,13 +19,13 @@ struct wait_queue
struct select_table_elt
{
- struct condition *dependent_condition;
+ pthread_cond_t *dependent_condition;
struct select_table_elt *next;
};
typedef struct select_table_struct
{
- struct condition master_condition;
+ pthread_cond_t master_condition;
struct select_table_elt *head;
} select_table;