+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
#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"
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
modules/spl/Makefile
modules/splat/Makefile
include/Makefile
+ include/sys/Makefile
scripts/Makefile
scripts/spl.spec
])
-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
+++ /dev/null
-#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 */
+++ /dev/null
-#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 */
--- /dev/null
+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
#endif
#include <linux/module.h>
-#include "spl-mutex.h"
+#include <sys/mutex.h>
#define DEBUG_CALLB
--- /dev/null
+#ifndef _SPL_CMN_ERR_H
+#define _SPL_CMN_ERR_H
+
+#endif /* SPL_CMN_ERR_H */
--- /dev/null
+#ifndef _SPL_DEBUG_H
+#define _SPL_DEBUG_H
+
+#endif /* SPL_DEBUG_H */
#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. */
#endif
#include <linux/module.h>
-#include "spl-types.h"
+#include <sys/types.h>
/* See the "Big Theory Statement" in solaris mutex.c.
*
--- /dev/null
+#ifndef _SPL_PARAM_H
+#define _SPL_PARAM_H
+
+#endif /* SPL_PARAM_H */
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <asm/current.h>
-#include "spl-types.h"
+#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
--- /dev/null
+#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 */
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include "spl-types.h"
+#include <sys/types.h>
#undef DEBUG_TASKQ_UNIMPLEMENTED
#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
#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 */
-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
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);
-#include "spl-generic.h"
+#include <sys/generic.h>
#include "config.h"
/*
-#include "spl-kmem.h"
+#include <sys/kmem.h>
/*
* Memory allocation interfaces
-#include <spl-rwlock.h>
+#include <sys/rwlock.h>
int
rw_lock_held(krwlock_t *rwlp)
-#include <spl-taskq.h>
+#include <sys/taskq.h>
/*
* Task queue interface
-#include <spl-thread.h>
+#include <sys/thread.h>
/*
* Thread interfaces
#include <asm/uaccess.h>
#include <stdarg.h>
-#include "spl.h"
+#include <sys/spl.h>
#include "splat-ctl.h"
#define SPLAT_SUBSYSTEM_INIT(type) \