OK, I think this is the last of major cleanup and restructuring.

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
This commit is contained in:
behlendo 2008-02-28 00:48:31 +00:00
parent 07d339d467
commit 596e65b4e8
23 changed files with 43 additions and 41 deletions

View File

@ -1,7 +1,7 @@
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

View File

@ -6,7 +6,7 @@ extern "C" {
#endif
#include <linux/module.h>
#include <linux-mutex.h>
#include "spl-mutex.h"
#define DEBUG_CALLB

View File

@ -6,7 +6,8 @@ extern "C" {
#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. */

View File

@ -6,6 +6,7 @@ extern "C" {
#endif
#include <linux/module.h>
#include "spl-types.h"
/* See the "Big Theory Statement" in solaris mutex.c.
*

View File

@ -5,7 +5,7 @@
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <asm/current.h>
#include <linux-types.h>
#include "spl-types.h"
#ifdef __cplusplus
extern "C" {

View File

@ -24,7 +24,7 @@ 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

View File

@ -8,8 +8,8 @@ extern "C" {
#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

View File

@ -12,7 +12,7 @@ extern "C" {
#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 */

View File

@ -1,4 +1,19 @@
#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 */

View File

@ -2,18 +2,18 @@
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/

View File

@ -1,4 +1,4 @@
#include "linux-generic.h"
#include "spl-generic.h"
#include "config.h"
/*

View File

@ -1,4 +1,4 @@
#include "linux-kmem.h"
#include "spl-kmem.h"
/*
* Memory allocation interfaces

View File

@ -1,4 +1,4 @@
#include <linux-rwlock.h>
#include <spl-rwlock.h>
int
rw_lock_held(krwlock_t *rwlp)

View File

@ -1,4 +1,4 @@
#include <linux-taskq.h>
#include <spl-taskq.h>
/*
* Task queue interface

View File

@ -1,4 +1,4 @@
#include <linux-thread.h>
#include <spl-thread.h>
/*
* Thread interfaces
@ -90,8 +90,7 @@ __thread_create(caddr_t stk, size_t stksize, void (*proc)(void *),
/* 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 (;;) {

View File

@ -18,22 +18,8 @@
#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_; \