]> granicus.if.org Git - spl/commitdiff
Reorganize /include/ to add a /sys/, this way we don't need to
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Sat, 1 Mar 2008 00:45:59 +0000 (00:45 +0000)
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Sat, 1 Mar 2008 00:45:59 +0000 (00:45 +0000)
muck with #includes in existing Solaris style source to get it
to find the right stuff.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@18 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

34 files changed:
cmd/Makefile.am
cmd/splat.h
configure.ac
include/Makefile.am
include/spl.h [deleted file]
include/splat-ctl.h [deleted file]
include/sys/Makefile.am [new file with mode: 0644]
include/sys/callb.h [moved from include/spl-callb.h with 97% similarity]
include/sys/cmn_err.h [new file with mode: 0644]
include/sys/condvar.h [moved from include/spl-condvar.h with 100% similarity]
include/sys/cred.h [moved from include/spl-cred.h with 100% similarity]
include/sys/debug.h [new file with mode: 0644]
include/sys/generic.h [moved from include/spl-generic.h with 100% similarity]
include/sys/kmem.h [moved from include/spl-kmem.h with 100% similarity]
include/sys/kstat.h [moved from include/spl-kstat.h with 99% similarity]
include/sys/mutex.h [moved from include/spl-mutex.h with 99% similarity]
include/sys/param.h [new file with mode: 0644]
include/sys/random.h [moved from include/spl-random.h with 100% similarity]
include/sys/rwlock.h [moved from include/spl-rwlock.h with 99% similarity]
include/sys/spl.h [new file with mode: 0644]
include/sys/taskq.h [moved from include/spl-taskq.h with 99% similarity]
include/sys/thread.h [moved from include/spl-thread.h with 96% similarity]
include/sys/time.h [moved from include/spl-time.h with 98% similarity]
include/sys/timer.h [moved from include/spl-timer.h with 100% similarity]
include/sys/types.h [moved from include/spl-types.h with 100% similarity]
lib/Makefile.am
lib/list.c
lib/list.h [moved from include/list.h with 100% similarity]
modules/spl/spl-generic.c
modules/spl/spl-kmem.c
modules/spl/spl-rwlock.c
modules/spl/spl-taskq.c
modules/spl/spl-thread.c
modules/splat/splat-internal.h

index 1a10fa808171dc8d6678344067cceaf36bdcc349..d3d7477974f92e760a0ed712cfbbb3df46a65a1f 100644 (file)
@@ -1,6 +1,8 @@
+DEFAULT_INCLUDES = -I. -I.. -I../lib
 AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow
-INCLUDES = -I$(top_srcdir)/include
+
 sbin_PROGRAMS = splat
 splat_SOURCES = splat.c
 splat_LDFLAGS = $(top_builddir)/lib/libcommon.la
+
 EXTRA_DIST = splat.h
index 8698057231dc05faeafee4b0d74f16d2f9102682..e4419def53f8e32e14e25cc3d95032344fb9b1a8 100644 (file)
@@ -2,7 +2,7 @@
 #define _SPLAT_H
 
 #include "list.h"
-#include "splat-ctl.h"
+#include "../include/splat-ctl.h"
 
 #define DEV_NAME                       "/dev/splatctl"
 #define COLOR_BLACK                    "\033[0;30m"
index 6b8dd7d36b01df3ae192baead279d7adb51b68da..9a7b103d0c85d285f9d7824b32b315ba2b49e69c 100644 (file)
@@ -2,7 +2,7 @@ AC_INIT
 
 AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE(spl, 0.0.1)
-AC_CONFIG_HEADERS([include/config.h])
+AC_CONFIG_HEADERS([config.h])
 
 AC_PROG_INSTALL
 AC_PROG_CC
@@ -115,6 +115,7 @@ AC_CONFIG_FILES([ Makefile
                   modules/spl/Makefile
                   modules/splat/Makefile
                   include/Makefile
+                  include/sys/Makefile
                   scripts/Makefile
                   scripts/spl.spec
                ])
index b84da9a8ee02c4835f88139109a7db4e4bf7478c..161a93a8dc008c9f9d38421ae6ccfcdac5f08e60 100644 (file)
@@ -1,7 +1,3 @@
-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 += list.h
+SUBDIRS = sys
+
+EXTRA_DIST = splat-ctl.h
diff --git a/include/spl.h b/include/spl.h
deleted file mode 100644 (file)
index d069fd9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#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 */
diff --git a/include/splat-ctl.h b/include/splat-ctl.h
deleted file mode 100644 (file)
index d905340..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef _SPLAT_CTL_H
-#define _SPLAT_CTL_H
-
-/* Contains shared definitions which both the userspace
- * and kernelspace portions of splat must agree on.
- */
-
-#define SPLAT_MAJOR                    229 /* XXX - Arbitrary */
-#define SPLAT_MINORS                    1
-#define SPLAT_DEV                      "/dev/splatctl"
-
-#define SPLAT_NAME_SIZE                        12
-#define SPLAT_DESC_SIZE                        60
-
-typedef struct splat_user {
-       char name[SPLAT_NAME_SIZE];     /* short name */
-       char desc[SPLAT_DESC_SIZE];     /* short description */
-       int id;                         /* unique numeric id */
-} splat_user_t;
-
-#define        SPLAT_CFG_MAGIC                 0x15263748U
-typedef struct splat_cfg {
-       unsigned int cfg_magic;         /* Unique magic */
-       int cfg_cmd;                    /* Config command */
-       int cfg_arg1;                   /* Config command arg 1 */
-       int cfg_rc1;                    /* Config response 1 */
-       union {
-               struct {
-                       int size;
-                       splat_user_t descs[0];
-               } splat_subsystems;
-               struct {
-                       int size;
-                       splat_user_t descs[0];
-               } splat_tests;
-       } cfg_data;
-} splat_cfg_t;
-
-#define        SPLAT_CMD_MAGIC                 0x9daebfc0U
-typedef struct splat_cmd {
-       unsigned int cmd_magic;         /* Unique magic */
-       int cmd_subsystem;              /* Target subsystem */
-       int cmd_test;                   /* Subsystem test */
-       int cmd_data_size;              /* Extra opaque data */
-       char cmd_data_str[0];           /* Opaque data region */
-} splat_cmd_t;
-
-/* Valid ioctls */
-#define SPLAT_CFG                              _IOWR('f', 101, long)
-#define SPLAT_CMD                              _IOWR('f', 102, long)
-
-/* Valid configuration commands */
-#define SPLAT_CFG_BUFFER_CLEAR         0x001   /* Clear text buffer */
-#define SPLAT_CFG_BUFFER_SIZE          0x002   /* Resize text buffer */
-#define SPLAT_CFG_SUBSYSTEM_COUNT              0x101   /* Number of subsystem */
-#define SPLAT_CFG_SUBSYSTEM_LIST               0x102   /* List of N subsystems */
-#define SPLAT_CFG_TEST_COUNT           0x201   /* Number of tests */
-#define SPLAT_CFG_TEST_LIST            0x202   /* List of N tests */
-
-/* Valid subsystem and test commands defined in each subsystem, we do
- * need to be careful to avoid colisions.  That alone may argue to define
- * them all here, for now we just define the global error codes.
- */
-#define SPLAT_SUBSYSTEM_UNKNOWN                0xF00
-#define SPLAT_TEST_UNKNOWN             0xFFF
-
-#endif /* _SPLAT_CTL_H */
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
new file mode 100644 (file)
index 0000000..c44748e
--- /dev/null
@@ -0,0 +1,5 @@
+EXTRA_DIST  = callb.h cmn_err.h condvar.h cred.h
+EXTRA_DIST += debug.h generic.h kmem.h kstat.h
+EXTRA_DIST += mutex.h param.h random.h rwlock.h
+EXTRA_DIST += spl.h taskq.h thread.h time.h
+EXTRA_DIST += timer.h types.h
similarity index 97%
rename from include/spl-callb.h
rename to include/sys/callb.h
index 98b966778fca09a9b8ff318c9e90d7044f499770..053ddf50096bc249827cc0bf53ee3ad9137cad76 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #include <linux/module.h>
-#include "spl-mutex.h"
+#include <sys/mutex.h>
 
 #define DEBUG_CALLB
 
diff --git a/include/sys/cmn_err.h b/include/sys/cmn_err.h
new file mode 100644 (file)
index 0000000..44ccefc
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef _SPL_CMN_ERR_H
+#define _SPL_CMN_ERR_H
+
+#endif /* SPL_CMN_ERR_H */
similarity index 100%
rename from include/spl-condvar.h
rename to include/sys/condvar.h
similarity index 100%
rename from include/spl-cred.h
rename to include/sys/cred.h
diff --git a/include/sys/debug.h b/include/sys/debug.h
new file mode 100644 (file)
index 0000000..02f64c2
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef _SPL_DEBUG_H
+#define _SPL_DEBUG_H
+
+#endif /* SPL_DEBUG_H */
similarity index 100%
rename from include/spl-generic.h
rename to include/sys/generic.h
similarity index 100%
rename from include/spl-kmem.h
rename to include/sys/kmem.h
similarity index 99%
rename from include/spl-kstat.h
rename to include/sys/kstat.h
index cbef067d57e0dec0ade35db661e5cd2113715dbf..0b79a41c04e6068cf5efb0a8e35ace82431c3f79 100644 (file)
@@ -6,8 +6,8 @@ extern "C" {
 #endif
 
 #include <linux/module.h>
-#include "spl-types.h"
-#include "spl-time.h"
+#include <sys/types.h>
+#include <sys/time.h>
 
 /* XXX - The minimum functionality here is stubbed out but nothing works. */
 
similarity index 99%
rename from include/spl-mutex.h
rename to include/sys/mutex.h
index dec5dd7de1ecc8b151c99027fda4891428fabcee..2db4a7f96d8307f2c1969986ba11c37a02c66a1c 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #include <linux/module.h>
-#include "spl-types.h"
+#include <sys/types.h>
 
 /* See the "Big Theory Statement" in solaris mutex.c.
  *
diff --git a/include/sys/param.h b/include/sys/param.h
new file mode 100644 (file)
index 0000000..f924006
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef _SPL_PARAM_H
+#define _SPL_PARAM_H
+
+#endif /* SPL_PARAM_H */
similarity index 100%
rename from include/spl-random.h
rename to include/sys/random.h
similarity index 99%
rename from include/spl-rwlock.h
rename to include/sys/rwlock.h
index b04a4f0dbd8c40aa023546deb955e149236891bb..6c55ced98a2e7337731eb9377e7f892a1e8a7533 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/slab.h>
 #include <linux/rwsem.h>
 #include <asm/current.h>
-#include "spl-types.h"
+#include <sys/types.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/include/sys/spl.h b/include/sys/spl.h
new file mode 100644 (file)
index 0000000..7cc1cab
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _SPL_H
+#define _SPL_H
+
+#include <sys/callb.h>
+#include <sys/condvar.h>
+#include <sys/cred.h>
+#include <sys/generic.h>
+#include <sys/kmem.h>
+#include <sys/kstat.h>
+#include <sys/mutex.h>
+#include <sys/random.h>
+#include <sys/rwlock.h>
+#include <sys/taskq.h>
+#include <sys/thread.h>
+#include <sys/time.h>
+#include <sys/timer.h>
+#include <sys/types.h>
+
+#endif /* _SPL_H */
similarity index 99%
rename from include/spl-taskq.h
rename to include/sys/taskq.h
index 3723a6d47cab64973d7c29f12f9b071a7b37544a..2d7583daf03ae787aadc15f5302aa17015927958 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
 #include <linux/gfp.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
-#include "spl-types.h"
+#include <sys/types.h>
 
 #undef DEBUG_TASKQ_UNIMPLEMENTED
 
similarity index 96%
rename from include/spl-thread.h
rename to include/sys/thread.h
index 8833846e9161cc32f9390c5028167f8cfcc882ba..e7f99c96d4466d6f50dd1935c1b0033d306edcd2 100644 (file)
@@ -8,8 +8,8 @@ extern "C" {
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/spinlock.h>
-#include "spl-types.h"
-#include "spl-generic.h"
+#include <sys/types.h>
+#include <sys/generic.h>
 
 /*
  * Thread interfaces
similarity index 98%
rename from include/spl-time.h
rename to include/sys/time.h
index 576fd191c10aef39b20752f20953768f7d2038ee..726bd5f8a0c1672af62549bb617ac8ff99c87e0a 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
 #include <linux/module.h>
 #include <linux/time.h>
-#include "spl-types.h"
+#include <sys/types.h>
 
 extern unsigned long long monotonic_clock(void);
 typedef struct timespec timestruc_t;    /* definition per SVr4 */
similarity index 100%
rename from include/spl-timer.h
rename to include/sys/timer.h
similarity index 100%
rename from include/spl-types.h
rename to include/sys/types.h
index 91c228fb0c61da4a51544300c17348a02fcde617..24ba7291312f931c4748c361feb58d0fc530dec7 100644 (file)
@@ -1,3 +1,7 @@
-INCLUDES = -I$(top_srcdir)/include
+DEFAULT_INCLUDES = -I. -I..
+AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow
+
 noinst_LTLIBRARIES = libcommon.la
 libcommon_la_SOURCES = list.c
+
+EXTRA_DIST = list.h
index 6548cacbca6cb258427b8ae247b477db6989d291..88af47c402a3b0a6cb331471b96fdab6df5a14d5 100644 (file)
@@ -776,7 +776,7 @@ list_alloc_aux (int size, void *pfreelist)
     void **plast;
 
     assert(sizeof(char) == 1);
-    assert(size >= sizeof(void *));
+    assert(size >= (int)sizeof(void *));
     assert(pfreelist != NULL);
     assert(LIST_ALLOC > 0);
     list_mutex_lock(&list_free_lock);
similarity index 100%
rename from include/list.h
rename to lib/list.h
index 8a843569400e1c56e910d8f245bf093196901c20..653b8cd1f71d6206f1e54637d911c9274d266d7a 100644 (file)
@@ -1,4 +1,4 @@
-#include "spl-generic.h"
+#include <sys/generic.h>
 #include "config.h"
 
 /*
index 9b8ba26a7eae428e540d01f53f2c06ebc2f25324..6442d5824b73b05d5a3bdd8a8435c52e8a06c748 100644 (file)
@@ -1,4 +1,4 @@
-#include "spl-kmem.h"
+#include <sys/kmem.h>
 
 /*
  * Memory allocation interfaces
index cafdd9b1c192e1ea511460574bc254a74288a707..d74d89e24f84bd712e3a097088098d863a15465f 100644 (file)
@@ -1,4 +1,4 @@
-#include <spl-rwlock.h>
+#include <sys/rwlock.h>
 
 int
 rw_lock_held(krwlock_t *rwlp)
index d20ae59bdda68d1f8b89a07103ea43c57fea56a5..0bfae54526a3a5d99b60f90278916afd7692bc75 100644 (file)
@@ -1,4 +1,4 @@
-#include <spl-taskq.h>
+#include <sys/taskq.h>
 
 /*
  * Task queue interface
index b55f8c6af1921e6026339f80c021f41b926d1a8d..40b1b316f6b899536673860ef417100ecb46e51f 100644 (file)
@@ -1,4 +1,4 @@
-#include <spl-thread.h>
+#include <sys/thread.h>
 
 /*
  * Thread interfaces
index a64b711fed6dc6e0f27500eeb32256198d9d32e0..d44c324632c85538c97882d90f6db8e0b029ae8b 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/uaccess.h>
 #include <stdarg.h>
 
-#include "spl.h"
+#include <sys/spl.h>
 #include "splat-ctl.h"
 
 #define SPLAT_SUBSYSTEM_INIT(type)                                      \