We've dropped all the linux- prefixes on the file in favor of spl-
which makes more sense. And we've cleaned up some of the includes
so everybody should be including their own dependencies properly.
All a module which wants to use the spl support needs to do in
include spl.h and ensure it has access to Module.symvers.
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@16
7e1ea52c-4ff2-0310-8f11-
9dd32ca42a1c
EXTRA_DIST = spl.h
+EXTRA_DIST += spl-condvar.h spl-kmem.h spl-random.h spl-thread.h
+EXTRA_DIST += spl-types.h spl-cred.h spl-kstat.h spl-rwlock.h
+EXTRA_DIST += spl-time.h spl-callb.h spl-generic.h spl-mutex.h
+EXTRA_DIST += spl-taskq.h spl-timer.h
EXTRA_DIST += splat-ctl.h
-EXTRA_DIST += linux-condvar.h linux-kmem.h linux-random.h linux-thread.h
-EXTRA_DIST += linux-types.h linux-cred.h linux-kstat.h linux-rwlock.h
-EXTRA_DIST += linux-time.h linux-callb.h linux-generic.h linux-mutex.h
-EXTRA_DIST += linux-taskq.h linux-timer.h
EXTRA_DIST += list.h
#endif
#include <linux/module.h>
-#include <linux-mutex.h>
+#include "spl-mutex.h"
#define DEBUG_CALLB
#endif
#include <linux/module.h>
-#include <linux-types.h>
+#include "spl-types.h"
+#include "spl-time.h"
/* XXX - The minimum functionality here is stubbed out but nothing works. */
#endif
#include <linux/module.h>
+#include "spl-types.h"
/* See the "Big Theory Statement" in solaris mutex.c.
*
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <asm/current.h>
-#include <linux-types.h>
+#include "spl-types.h"
#ifdef __cplusplus
extern "C" {
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include <linux-types.h>
+#include "spl-types.h"
#undef DEBUG_TASKQ_UNIMPLEMENTED
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/spinlock.h>
-#include <linux-types.h>
-#include <linux-generic.h>
+#include "spl-types.h"
+#include "spl-generic.h"
/*
* Thread interfaces
#include <linux/module.h>
#include <linux/time.h>
-#include <linux-types.h>
+#include "spl-types.h"
extern unsigned long long monotonic_clock(void);
typedef struct timespec timestruc_t; /* definition per SVr4 */
#ifndef _SPL_H
#define _SPL_H
+#include "spl-callb.h"
+#include "spl-condvar.h"
+#include "spl-cred.h"
+#include "spl-generic.h"
+#include "spl-kmem.h"
+#include "spl-kstat.h"
+#include "spl-mutex.h"
+#include "spl-random.h"
+#include "spl-rwlock.h"
+#include "spl-taskq.h"
+#include "spl-thread.h"
+#include "spl-time.h"
+#include "spl-timer.h"
+#include "spl-types.h"
+
#endif /* _SPL_H */
MODULES := spl
DISTFILES = Makefile.in \
- linux-kmem.c linux-rwlock.c linux-taskq.c \
- linux-thread.c linux-generic.c
+ spl-kmem.c spl-rwlock.c spl-taskq.c \
+ spl-thread.c spl-generic.c
CPPFLAGS += @KERNELCPPFLAGS@
# Solaris porting layer module
obj-m := spl.o
-spl-objs += linux-kmem.o
-spl-objs += linux-thread.o
-spl-objs += linux-taskq.o
-spl-objs += linux-rwlock.o
-spl-objs += linux-generic.o
+spl-objs += spl-kmem.o
+spl-objs += spl-thread.o
+spl-objs += spl-taskq.o
+spl-objs += spl-rwlock.o
+spl-objs += spl-generic.o
splmodule := spl.ko
splmoduledir := @kmoduledir@/kernel/lib/
-#include "linux-generic.h"
+#include "spl-generic.h"
#include "config.h"
/*
-#include "linux-kmem.h"
+#include "spl-kmem.h"
/*
* Memory allocation interfaces
-#include <linux-rwlock.h>
+#include <spl-rwlock.h>
int
rw_lock_held(krwlock_t *rwlp)
-#include <linux-taskq.h>
+#include <spl-taskq.h>
/*
* Task queue interface
-#include <linux-thread.h>
+#include <spl-thread.h>
/*
* Thread interfaces
/* Solaris says this must never fail so we try forever */
while ((pid = kernel_thread(thread_generic_wrapper, (void *)&tp, 0)) < 0)
- printk(KERN_ERR "linux-thread: Unable to create thread; "
- "pid = %ld\n", pid);
+ printk(KERN_ERR "Unable to create thread; pid = %ld\n", pid);
/* All signals are ignored due to sleeping TASK_UNINTERRUPTIBLE */
for (;;) {
#include <asm/uaccess.h>
#include <stdarg.h>
-#include <linux-generic.h>
-#include <linux-types.h>
-#include <linux-kmem.h>
-#include <linux-mutex.h>
-#include <linux-condvar.h>
-#include <linux-random.h>
-#include <linux-thread.h>
-#include <linux-taskq.h>
-#include <linux-rwlock.h>
-#include <linux-timer.h>
-#include <linux-time.h>
-#include <linux-cred.h>
-#include <linux-kstat.h>
-#include <linux-callb.h>
-
-#include <splat-ctl.h>
+#include "spl.h"
+#include "splat-ctl.h"
#define SPLAT_SUBSYSTEM_INIT(type) \
({ splat_subsystem_t *_sub_; \