diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-23 09:47:09 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-31 13:18:50 +0100 |
commit | f9c271459034e777d586f589af90deb9b7acd5a0 (patch) | |
tree | 2065e9400ad6dc3175fb2e5230282c2cf6c6b950 /freebsd/sys | |
parent | Rename file to reflect FreeBSD origin (diff) | |
download | rtems-libbsd-f9c271459034e777d586f589af90deb9b7acd5a0.tar.bz2 |
SLEEP(8): New implementation
Diffstat (limited to 'freebsd/sys')
-rw-r--r-- | freebsd/sys/sys/proc.h | 2 | ||||
-rw-r--r-- | freebsd/sys/sys/systm.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/freebsd/sys/sys/proc.h b/freebsd/sys/sys/proc.h index 6dbc88c5..ba40e259 100644 --- a/freebsd/sys/sys/proc.h +++ b/freebsd/sys/sys/proc.h @@ -214,8 +214,8 @@ struct thread { struct cpuset *td_cpuset; /* (t) CPU affinity mask. */ #endif /* __rtems__ */ struct seltd *td_sel; /* Select queue/channel. */ -#ifndef __rtems__ struct sleepqueue *td_sleepqueue; /* (k) Associated sleep queue. */ +#ifndef __rtems__ struct turnstile *td_turnstile; /* (k) Associated turnstile. */ struct umtx_q *td_umtxq; /* (c?) Link for when we're blocked. */ lwpid_t td_tid; /* (b) Thread ID. */ diff --git a/freebsd/sys/sys/systm.h b/freebsd/sys/sys/systm.h index e464356a..9fce4b4a 100644 --- a/freebsd/sys/sys/systm.h +++ b/freebsd/sys/sys/systm.h @@ -339,8 +339,13 @@ int _sleep(void *chan, struct lock_object *lock, int pri, const char *wmesg, int timo) __nonnull(1); #define msleep(chan, mtx, pri, wmesg, timo) \ _sleep((chan), &(mtx)->lock_object, (pri), (wmesg), (timo)) +#ifndef __rtems__ int msleep_spin(void *chan, struct mtx *mtx, const char *wmesg, int timo) __nonnull(1); +#else /* __rtems__ */ +#define msleep_spin(chan, mtx, wmesg, timo) \ + msleep((chan), (mtx), 0, (wmesg), (timo)) +#endif /* __rtems__ */ int pause(const char *wmesg, int timo); #define tsleep(chan, pri, wmesg, timo) \ _sleep((chan), NULL, (pri), (wmesg), (timo)) |