+/*
+ * This file is part of the SPL: Solaris Porting Layer.
+ *
+ * Copyright (c) 2008 Lawrence Livermore National Security, LLC.
+ * Produced at Lawrence Livermore National Laboratory
+ * Written by:
+ * Brian Behlendorf <behlendorf1@llnl.gov>,
+ * Herb Wartens <wartens2@llnl.gov>,
+ * Jim Garlick <garlick@llnl.gov>
+ * UCRL-CODE-235197
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef _SPLAT_INTERNAL_H
#define _SPLAT_INTERNAL_H
#include <linux/module.h>
#include <linux/device.h>
#include <linux/list.h>
+
#include <asm/ioctls.h>
#include <asm/uaccess.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/kobj.h>
#include <sys/atomic.h>
+#include <sys/list.h>
+#include <sys/sunddi.h>
+#include <linux/cdev.h>
+#include "spl-device.h"
#include "splat-ctl.h"
#define SPLAT_SUBSYSTEM_INIT(type) \
printk(KERN_ERR "splat: Error initializing: " n "/" #tid" \n");\
} else { \
memset(_test_, 0, sizeof(*_test_)); \
- strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE); \
- strncpy(_test_->desc.desc, d, SPLAT_DESC_SIZE); \
+ strncpy(_test_->desc.name, n, SPLAT_NAME_SIZE-1); \
+ strncpy(_test_->desc.desc, d, SPLAT_DESC_SIZE-1); \
_test_->desc.id = tid; \
_test_->test = func; \
INIT_LIST_HEAD(&(_test_->test_list)); \
#define splat_vprint(file, test, format, args...) \
splat_print(file, "%*s: " format, SPLAT_NAME_SIZE, test, args)
-splat_subsystem_t * splat_condvar_init(void);
-splat_subsystem_t * splat_kmem_init(void);
-splat_subsystem_t * splat_mutex_init(void);
-splat_subsystem_t * splat_krng_init(void);
-splat_subsystem_t * splat_rwlock_init(void);
-splat_subsystem_t * splat_taskq_init(void);
-splat_subsystem_t * splat_thread_init(void);
-splat_subsystem_t * splat_time_init(void);
-splat_subsystem_t * splat_vnode_init(void);
-splat_subsystem_t * splat_kobj_init(void);
-splat_subsystem_t * splat_atomic_init(void);
+splat_subsystem_t *splat_condvar_init(void);
+splat_subsystem_t *splat_kmem_init(void);
+splat_subsystem_t *splat_mutex_init(void);
+splat_subsystem_t *splat_krng_init(void);
+splat_subsystem_t *splat_rwlock_init(void);
+splat_subsystem_t *splat_taskq_init(void);
+splat_subsystem_t *splat_thread_init(void);
+splat_subsystem_t *splat_time_init(void);
+splat_subsystem_t *splat_vnode_init(void);
+splat_subsystem_t *splat_kobj_init(void);
+splat_subsystem_t *splat_atomic_init(void);
+splat_subsystem_t *splat_list_init(void);
+splat_subsystem_t *splat_generic_init(void);
void splat_condvar_fini(splat_subsystem_t *);
void splat_kmem_fini(splat_subsystem_t *);
void splat_vnode_fini(splat_subsystem_t *);
void splat_kobj_fini(splat_subsystem_t *);
void splat_atomic_fini(splat_subsystem_t *);
+void splat_list_fini(splat_subsystem_t *);
+void splat_generic_fini(splat_subsystem_t *);
int splat_condvar_id(void);
int splat_kmem_id(void);
int splat_vnode_id(void);
int splat_kobj_id(void);
int splat_atomic_id(void);
+int splat_list_id(void);
+int splat_generic_id(void);
#endif /* _SPLAT_INTERNAL_H */