summaryrefslogtreecommitdiffstats
path: root/freebsd/sys
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys')
-rw-r--r--freebsd/sys/callout.h11
-rw-r--r--freebsd/sys/mutex.h5
-rw-r--r--freebsd/sys/sleepqueue.h1
3 files changed, 6 insertions, 11 deletions
diff --git a/freebsd/sys/callout.h b/freebsd/sys/callout.h
index ed4e20eb..4686a4db 100644
--- a/freebsd/sys/callout.h
+++ b/freebsd/sys/callout.h
@@ -46,23 +46,16 @@ SLIST_HEAD(callout_list, callout);
TAILQ_HEAD(callout_tailq, callout);
struct callout {
-#ifndef __rtems__
union {
SLIST_ENTRY(callout) sle;
TAILQ_ENTRY(callout) tqe;
} c_links;
int c_time; /* ticks to the event */
-#else /* __rtems__ */
- rtems_chain_node c_node;
- rtems_id c_id;
-#endif /* __rtems__ */
void *c_arg; /* function argument */
void (*c_func)(void *); /* function to call */
struct lock_object *c_lock; /* lock to handle */
int c_flags; /* state of this entry */
-#ifndef __rtems__
volatile int c_cpu; /* CPU we're scheduled on */
-#endif /* __rtems__ */
};
#define CALLOUT_LOCAL_ALLOC 0x0001 /* was allocated from callfree */
@@ -92,12 +85,8 @@ void _callout_init_lock(struct callout *, struct lock_object *, int);
NULL, (flags))
#define callout_pending(c) ((c)->c_flags & CALLOUT_PENDING)
int callout_reset_on(struct callout *, int, void (*)(void *), void *, int);
-#ifndef __rtems__
#define callout_reset(c, on_tick, fn, arg) \
callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu)
-#else /* __rtems__ */
-int callout_reset(struct callout *, int, void (*)(void *), void *);
-#endif /* __rtems__ */
#define callout_reset_curcpu(c, on_tick, fn, arg) \
callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid))
int callout_schedule(struct callout *, int);
diff --git a/freebsd/sys/mutex.h b/freebsd/sys/mutex.h
index 434a1eaf..0e8e1739 100644
--- a/freebsd/sys/mutex.h
+++ b/freebsd/sys/mutex.h
@@ -122,10 +122,15 @@ void _mtx_unlock_spin(struct mtx *m, int opts, const char *file, int line);
int _mtx_trylock(struct mtx *m, int opts, const char *file, int line);
void _mtx_lock_flags(struct mtx *m, int opts, const char *file, int line);
void _mtx_unlock_flags(struct mtx *m, int opts, const char *file, int line);
+#ifndef __rtems__
void _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file,
int line);
void _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file,
int line);
+#else /* __rtems__ */
+#define _mtx_lock_spin_flags _mtx_lock_flags
+#define _mtx_unlock_spin_flags _mtx_unlock_flags
+#endif /* __rtems__ */
#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT)
void _mtx_assert(struct mtx *m, int what, const char *file, int line);
#endif
diff --git a/freebsd/sys/sleepqueue.h b/freebsd/sys/sleepqueue.h
new file mode 100644
index 00000000..936ffd88
--- /dev/null
+++ b/freebsd/sys/sleepqueue.h
@@ -0,0 +1 @@
+/* EMPTY */