libcfs_debug.h \
libcfs_fail.h \
libcfs_hash.h \
- libcfs_heap.h \
libcfs_private.h \
libcfs_string.h \
libcfs_workitem.h
#include <libcfs/libcfs_string.h>
#include <libcfs/libcfs_workitem.h>
#include <libcfs/libcfs_hash.h>
-#include <libcfs/libcfs_heap.h>
#include <libcfs/libcfs_fail.h>
#include "curproc.h"
libcfs-objs-$(CONFIG_SMP) = libcfs_cpu.o
libcfs-all-objs := debug.o fail.o module.o tracefile.o \
- libcfs_string.o hash.o heap.o \
+ libcfs_string.o hash.o \
workitem.o \
libcfs_mem.o libcfs_lock.o \
linux-crypto.o linux-crypto-adler.o \
MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ linux/*.o libcfs crypto/*.o
EXTRA_DIST := $(libcfs-all-objs:%.o=%.c) tracefile.h \
workitem.c fail.c libcfs_cpu.c \
- heap.c libcfs_mem.c libcfs_lock.c \
+ libcfs_mem.c libcfs_lock.c \
linux-crypto.h
};
#include <lustre_nrs_fifo.h>
+/**
+ * Binary heap node.
+ *
+ * Objects of this type are embedded into objects of the ordered set that is to
+ * be maintained by a \e struct cfs_binheap instance.
+ */
+struct cfs_binheap_node {
+ /** Index into the binary tree */
+ unsigned int chn_index;
+};
#ifdef HAVE_SERVER_SUPPORT
#include <lustre_nrs_tbf.h>
#include <lustre_nrs_crr.h>
ptlrpc_objs += llog_net.o llog_client.o llog_server.o import.o ptlrpcd.o
ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o
ptlrpc_objs += sec.o sec_ctx.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o
-ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o nrs_delay.o
+ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o nrs_delay.o heap.o
ptlrpc_objs += errno.o
nrs_server_objs := nrs_crr.o nrs_orr.o nrs_tbf.o
ln -sf $< $@
EXTRA_DIST := $(ptlrpc_objs:.o=.c) ptlrpc_internal.h
-EXTRA_DIST += $(nodemap_objs:.o=.c) nodemap_internal.h
+EXTRA_DIST += $(nodemap_objs:.o=.c) nodemap_internal.h heap.h
EXTRA_DIST += $(nrs_server_objs:.o=.c)
EXTRA_PRE_CFLAGS := -I@LUSTRE@/ldlm -I@LUSTRE@/target
* GNU General Public License version 2 for more details. A copy is
* included in the COPYING file that accompanied this code.
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
* GPL HEADER END
*/
/*
#define DEBUG_SUBSYSTEM S_LNET
#include <libcfs/libcfs.h>
+#include <lustre_net.h>
+#include "heap.h"
#define CBH_ALLOC(ptr, h) \
do { \
if ((h)->cbh_flags & CBH_FLAG_ATOMIC_GROW) \
LIBCFS_ALLOC_ATOMIC((ptr), CBH_NOB); \
else \
- LIBCFS_ALLOC((ptr), CBH_NOB); \
+ LIBCFS_ALLOC((ptr), CBH_NOB); \
} \
} while (0)
*/
struct cfs_binheap *
cfs_binheap_create(struct cfs_binheap_ops *ops, unsigned int flags,
- unsigned count, void *arg, struct cfs_cpt_table *cptab,
+ unsigned int count, void *arg, struct cfs_cpt_table *cptab,
int cptid)
{
struct cfs_binheap *h;
return &(h->cbh_elements2[idx >> CBH_SHIFT][idx & CBH_MASK]);
idx -= CBH_SIZE * CBH_SIZE;
- return &(h->cbh_elements3[idx >> (2 * CBH_SHIFT)]\
- [(idx >> CBH_SHIFT) & CBH_MASK]\
+ return &(h->cbh_elements3[idx >> (2 * CBH_SHIFT)]
+ [(idx >> CBH_SHIFT) & CBH_MASK]
[idx & CBH_MASK]);
}
* GNU General Public License version 2 for more details. A copy is
* included in the COPYING file that accompanied this code.
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
* GPL HEADER END
*/
/*
* @{
*/
-/**
- * Binary heap node.
- *
- * Objects of this type are embedded into objects of the ordered set that is to
- * be maintained by a \e struct cfs_binheap instance.
- */
-struct cfs_binheap_node {
- /** Index into the binary tree */
- unsigned int chn_index;
-};
-
#define CBH_SHIFT 9
#define CBH_SIZE (1 << CBH_SHIFT) /* # ptrs per level */
#define CBH_MASK (CBH_SIZE - 1)
void cfs_binheap_destroy(struct cfs_binheap *h);
struct cfs_binheap *
cfs_binheap_create(struct cfs_binheap_ops *ops, unsigned int flags,
- unsigned count, void *arg, struct cfs_cpt_table *cptab,
+ unsigned int count, void *arg, struct cfs_cpt_table *cptab,
int cptid);
struct cfs_binheap_node *
cfs_binheap_find(struct cfs_binheap *h, unsigned int idx);
#define PTLRPC_INTERNAL_H
#include "../ldlm/ldlm_internal.h"
+#include "heap.h"
struct ldlm_namespace;
struct obd_import;