Commit 0ed47ea3 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

CIL gets upset if includes are not in the same order, because int64_t gets...

CIL gets upset if includes are not in the same order, because int64_t gets typedefed to different things depending on what you include.  So do all the includes in a standard way.  Addresses #1185.

git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6439 c7de825b-a66e-492c-adef-691d508d4ae1
parent fd9bf113
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
# For very verbose output do # For very verbose output do
# make VERBOSE=2 # make VERBOSE=2
# For CIL do
# make CIL=1
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage # GCOV_FLAGS = -fprofile-arcs -ftest-coverage
# PROF_FLAGS = -pg # PROF_FLAGS = -pg
OPTFLAGS = -O3 OPTFLAGS = -O3
...@@ -58,6 +61,9 @@ ifdef BRT_FANOUT ...@@ -58,6 +61,9 @@ ifdef BRT_FANOUT
CPPFLAGS += -DBRT_FANOUT=$(BRT_FANOUT) CPPFLAGS += -DBRT_FANOUT=$(BRT_FANOUT)
endif endif
ifeq ($(CIL),1)
CC=../../cil/cil-1.3.6/bin/cilly --merge --keepmerged
endif
# When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test # When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test
...@@ -94,14 +100,19 @@ BRT_SOURCES = \ ...@@ -94,14 +100,19 @@ BRT_SOURCES = \
threadpool \ threadpool \
# keep this line so I can ha vea \ on the previous line # keep this line so I can ha vea \ on the previous line
OFILES = newbrt.o $(CYG_ADD_LIBZ) ifeq ($(CIL),1)
OFILES = $(patsubst %,%.o,$(BRT_SOURCES))
else
OFILES = newbrt.o
endif
TEST_OFILES = brt-test-helpers.o TEST_OFILES = brt-test-helpers.o
HFILES = $(wildcard *.h) HFILES = $(wildcard *.h)
BRT_C_FILES = $(patsubst %,%.c,$(BRT_SOURCES)) BRT_C_FILES = $(patsubst %,%.c,$(BRT_SOURCES))
ifeq ($(CC),icc) ifeq ($(CIL),1)
else ifeq ($(CC),icc)
newbrt.o: $(BRT_C_FILES) $(HFILES) newbrt.o: $(BRT_C_FILES) $(HFILES)
$(CC) -ipo-c $(CFLAGS) $(CPPFLAGS) $(BRT_C_FILES) -o $@ $(CC) -ipo-c $(CFLAGS) $(CPPFLAGS) $(BRT_C_FILES) -o $@
else else
...@@ -110,10 +121,10 @@ newbrt.o: $(BRT_C_FILES) $(HFILES) ...@@ -110,10 +121,10 @@ newbrt.o: $(BRT_C_FILES) $(HFILES)
endif endif
tdb_logprint.o: log-internal.h brttypes.h log.h kv-pair.h log_header.h tdb_logprint.o: log-internal.h brttypes.h log.h kv-pair.h log_header.h
tdb_logprint: $(OFILES) tdb_logprint: $(OFILES) $(CYG_ADD_LIBZ)
recover.o: log_header.h log-internal.h log.h brttypes.h kv-pair.h memory.h key.h cachetable.h recover.o: log_header.h log-internal.h log.h brttypes.h kv-pair.h memory.h key.h cachetable.h
tdb-recover: $(OFILES) tdb-recover: $(OFILES) $(CYG_ADD_LIBZ)
roll.o: log_header.h log-internal.h log.h brttypes.h kv-pair.h memory.h key.h cachetable.h omt.h bread.h roll.o: log_header.h log-internal.h log.h brttypes.h kv-pair.h memory.h key.h cachetable.h omt.h bread.h
...@@ -123,7 +134,7 @@ log_header.h: log_code.c ...@@ -123,7 +134,7 @@ log_header.h: log_code.c
log_code.c: logformat log_code.c: logformat
./logformat ./logformat
libs: newbrt.o libs: $(OFILES) $(CYG_ADD_LIBZ)
bins: $(BINS) bins: $(BINS)
# Put the benchmarktest_256 first since it takes the longest (and we want to use parallelism in the make) # Put the benchmarktest_256 first since it takes the longest (and we want to use parallelism in the make)
...@@ -142,23 +153,19 @@ BRT_INTERNAL_H_INCLUDES = brt-internal.h cachetable.h fifo.h omt.h brt.h brt-sea ...@@ -142,23 +153,19 @@ BRT_INTERNAL_H_INCLUDES = brt-internal.h cachetable.h fifo.h omt.h brt.h brt-sea
brt-test-helpers.o: $(BRT_INTERNAL_H_INCLUDES) toku_assert.h brt-test-helpers.o: $(BRT_INTERNAL_H_INCLUDES) toku_assert.h
logformat: logformat.c toku_assert.c logformat: logformat.c toku_assert.c
brt-serialize-test.o: $(BRT_INTERNAL_H_INCLUDES) brt-serialize-test.o: $(BRT_INTERNAL_H_INCLUDES)
fifo-test: newbrt.o
log-test6 log-test5 log-test4 log-test3 log-test2 log-test: $(OFILES)
omt-test.o: toku_assert.h memory.h toku_assert.h ../include/db.h brttypes.h
omt-test: omt-test.o newbrt.o
test_toku_malloc_plain_free: newbrt.o test_toku_malloc_plain_free: newbrt.o
cachetable-test.o: cachetable.h memory.h cachetable-test.o: cachetable.h memory.h
cachetable-test: $(OFILES) cachetable-test: $(OFILES) $(CYG_ADD_LIBZ)
cachetable-test2.o: cachetable.h memory.h cachetable-test2.o: cachetable.h memory.h
cachetable-test2: $(OFILES) cachetable-test2: $(OFILES) $(CYG_ADD_LIBZ)
test-assert: newbrt.o test-assert: newbrt.o
brtdump: $(OFILES) brtdump: $(OFILES) $(CYG_ADD_LIBZ)
test_oexcl: test_oexcl.o newbrt.o test_oexcl: test_oexcl.o newbrt.o
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#include "block_allocator.h"
#include "memory.h"
#include "toku_assert.h"
#include <errno.h> #include "includes.h"
#include <string.h>
// Here's a very simple implementation. // Here's a very simple implementation.
// It's not very fast at allocating or freeing. // It's not very fast at allocating or freeing.
......
/* Buffered read. */ /* Buffered read. */
#include <assert.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "bread.h" #include "includes.h"
#include "memory.h"
struct bread { struct bread {
off_t current_offset; // The current offset to be read (in the file). That offset includes anything that is unread in the buffer. off_t current_offset; // The current offset to be read (in the file). That offset includes anything that is unread in the buffer.
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "toku_assert.h" #include "includes.h"
#include "block_allocator.h"
#include "brt-internal.h"
#include "key.h"
#include "rbuf.h"
#include "wbuf.h"
#include "kv-pair.h"
#include "mempool.h"
#include <arpa/inet.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <zlib.h>
#if 0 #if 0
static u_int64_t ntohll(u_int64_t v) { static u_int64_t ntohll(u_int64_t v) {
...@@ -177,13 +163,14 @@ wbufwriteleafentry (OMTVALUE lev, u_int32_t UU(idx), void *v) { ...@@ -177,13 +163,14 @@ wbufwriteleafentry (OMTVALUE lev, u_int32_t UU(idx), void *v) {
return 0; return 0;
} }
const int uncompressed_magic_len = (8 // tokuleaf or tokunode enum { uncompressed_magic_len = (8 // tokuleaf or tokunode
+4 // version +4 // version
+8 // lsn +8 // lsn
); ) };
const int compression_header_len = (4 // compressed_len enum { compression_header_len = (4 // compressed_len
+4); // uncompressed_len +4 // uncompressed_len
) };
void toku_serialize_brtnode_to (int fd, BLOCKNUM blocknum, BRTNODE node, struct brt_header *h) { void toku_serialize_brtnode_to (int fd, BLOCKNUM blocknum, BRTNODE node, struct brt_header *h) {
//printf("%s:%d serializing\n", __FILE__, __LINE__); //printf("%s:%d serializing\n", __FILE__, __LINE__);
...@@ -885,7 +872,7 @@ int toku_serialize_fifo_at (int fd, off_t freeoff, FIFO fifo) { ...@@ -885,7 +872,7 @@ int toku_serialize_fifo_at (int fd, off_t freeoff, FIFO fifo) {
//printf("%s:%d Serializing fifo at %" PRId64 " (count=%d)\n", __FILE__, __LINE__, freeoff, toku_fifo_n_entries(fifo)); //printf("%s:%d Serializing fifo at %" PRId64 " (count=%d)\n", __FILE__, __LINE__, freeoff, toku_fifo_n_entries(fifo));
lock_for_pwrite(); lock_for_pwrite();
{ {
int size=4; enum { size=4 };
char buf[size]; char buf[size];
struct wbuf w; struct wbuf w;
wbuf_init(&w, buf, size); wbuf_init(&w, buf, size);
......
...@@ -15,9 +15,7 @@ ...@@ -15,9 +15,7 @@
* Note: We don't yet have DUP trees, so thee checks on duplicate trees are unimplemented. (Nov 1 2007) * Note: We don't yet have DUP trees, so thee checks on duplicate trees are unimplemented. (Nov 1 2007)
*/ */
#include "brt-internal.h" #include "includes.h"
#include "toku_assert.h"
#include "kv-pair.h"
static void verify_local_fingerprint (BRTNODE node) { static void verify_local_fingerprint (BRTNODE node) {
u_int32_t fp=0; u_int32_t fp=0;
......
...@@ -24,23 +24,7 @@ ...@@ -24,23 +24,7 @@
* *
*/ */
#include <arpa/inet.h> #include "includes.h"
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include "block_allocator.h"
#include "toku_assert.h"
#include "brt-internal.h"
#include "key.h"
#include "log_header.h"
#include "kv-pair.h"
#include "mempool.h"
#include "leafentry.h"
//#define SLOW //#define SLOW
#ifdef SLOW #ifdef SLOW
......
/* Tell me the diff between two brt files. */ /* Tell me the diff between two brt files. */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
#include <inttypes.h>
#include "toku_assert.h" #include "includes.h"
#include "key.h"
#include "brt-internal.h"
static int dump_data = 1; static int dump_data = 1;
...@@ -252,12 +245,12 @@ int main (int argc, const char *argv[]) { ...@@ -252,12 +245,12 @@ int main (int argc, const char *argv[]) {
if (interactive) { if (interactive) {
while (1) { while (1) {
printf("brtdump>"); fflush(stdout); printf("brtdump>"); fflush(stdout);
const int maxline = 64; enum { maxline = 64};
char line[maxline+1]; char line[maxline+1];
readline(line, maxline); readline(line, maxline);
if (strcmp(line, "") == 0) if (strcmp(line, "") == 0)
break; break;
const int maxfields = 2; enum { maxfields = 2 };
char *fields[maxfields]; char *fields[maxfields];
int nfields = split_fields(line, fields, maxfields); int nfields = split_fields(line, fields, maxfields);
if (nfields == 0) if (nfields == 0)
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include <errno.h> #include "includes.h"
#include <malloc.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include "cachetable.h"
#include "hashfun.h"
#include "memory.h"
#include "toku_assert.h"
#include "brt-internal.h"
#include "log_header.h"
#include "threadpool.h"
#include "cachetable-rwlock.h"
#include <malloc.h>
// execute the cachetable callbacks using a writer thread 0->no 1->yes // execute the cachetable callbacks using a writer thread 0->no 1->yes
#define DO_WRITER_THREAD 1 #define DO_WRITER_THREAD 1
......
#include <stdlib.h> #include "includes.h"
#include <string.h>
#include <errno.h>
#include "toku_assert.h"
#include "memory.h"
#include "fifo.h"
#include "ybt.h"
struct fifo { struct fifo {
int n_items_in_fifo; int n_items_in_fifo;
......
#ifndef SYSINCLUDES_H
#define SYSINCLUDES_H
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
#endif
#define _FILE_OFFSET_BITS 64
#include <arpa/inet.h>
#include <ctype.h>
#include <errno.h>
#include <inttypes.h>
#include <malloc.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <sys/time.h>
#include <unistd.h>
#include <zlib.h>
#include "block_allocator.h"
#include "brt.h"
#include "brt-internal.h"
#include "cachetable.h"
#include "cachetable-rwlock.h"
#include "fifo.h"
#include "list.h"
#include "key.h"
#include "kv-pair.h"
#include "leafentry.h"
#include "log-internal.h"
#include "log_header.h"
#include "mempool.h"
#include "rbuf.h"
#include "threadpool.h"
#include "toku_assert.h"
#include "wbuf.h"
#include "../include/db.h"
#endif
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "brt-internal.h" #include "includes.h"
#include "toku_assert.h"
#include "key.h"
#include <string.h>
#if 0 #if 0
int toku_keycompare (bytevec key1b, ITEMLEN key1len, bytevec key2b, ITEMLEN key2len) { int toku_keycompare (bytevec key1b, ITEMLEN key1len, bytevec key2b, ITEMLEN key2len) {
......
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "brttypes.h" #include "includes.h"
#include "leafentry.h"
#include "memory.h"
#include "toku_assert.h"
#include "log.h"
#include "wbuf.h"
#include <arpa/inet.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
u_int32_t toku_le_crc(LEAFENTRY v) { u_int32_t toku_le_crc(LEAFENTRY v) {
return x1764_memory(v, leafentry_memsize(v)); return x1764_memory(v, leafentry_memsize(v));
......
#ifndef LOG_INTERNAL_H
#define LOG_INTERNAL_H
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include "brt-internal.h" #include "brt-internal.h"
...@@ -156,3 +159,4 @@ static inline char *fixup_fname(BYTESTRING *f) { ...@@ -156,3 +159,4 @@ static inline char *fixup_fname(BYTESTRING *f) {
} }
int toku_read_rollback_backwards(BREAD, struct roll_entry **item, MEMARENA); int toku_read_rollback_backwards(BREAD, struct roll_entry **item, MEMARENA);
#endif
...@@ -565,14 +565,13 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u ...@@ -565,14 +565,13 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u
unlink(headerpath); unlink(headerpath);
cf = fopen(codepath, "w"); assert(cf!=0); cf = fopen(codepath, "w"); assert(cf!=0);
hf = fopen(headerpath, "w"); assert(hf!=0); hf = fopen(headerpath, "w"); assert(hf!=0);
fprintf(hf, "#ifndef LOG_HEADER_H\n");
fprintf(hf, "#define LOG_HEADER_H\n");
fprintf2(cf, hf, "/* Do not edit this file. This code generated by logformat.c. Copyright 2007, 2008 Tokutek. */\n"); fprintf2(cf, hf, "/* Do not edit this file. This code generated by logformat.c. Copyright 2007, 2008 Tokutek. */\n");
fprintf2(cf, hf, "#ident \"Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved.\"\n"); fprintf2(cf, hf, "#ident \"Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved.\"\n");
fprintf(cf, "#include <stdio.h>\n"); fprintf(cf, "#include \"includes.h\"\n");
fprintf(hf, "#include \"brt-internal.h\"\n"); fprintf(hf, "#include \"brt-internal.h\"\n");
fprintf(hf, "#include \"memarena.h\"\n"); fprintf(hf, "#include \"memarena.h\"\n");
fprintf(cf, "#include \"log_header.h\"\n");
fprintf(cf, "#include \"wbuf.h\"\n");
fprintf(cf, "#include \"log-internal.h\"\n");
generate_enum(); generate_enum();
generate_log_struct(); generate_log_struct();
generate_dispatch(); generate_dispatch();
...@@ -580,6 +579,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u ...@@ -580,6 +579,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__u
generate_log_reader(); generate_log_reader();
generate_logprint(); generate_logprint();
generate_rollbacks(); generate_rollbacks();
fprintf(hf, "#endif\n");
{ {
int r=fclose(hf); int r=fclose(hf);
assert(r==0); assert(r==0);
......
#include <string.h> #include "includes.h"
#include <stdio.h>
#include "memarena.h"
#include "memory.h"
#include "toku_assert.h"
struct memarena { struct memarena {
char *buf; char *buf;
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "memory.h" #include "includes.h"
#include "toku_assert.h"
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
int toku_memory_check=0; int toku_memory_check=0;
......
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "mempool.h" #include "includes.h"
#include "toku_assert.h"
#include <stdio.h>
void toku_mempool_init(struct mempool *mp, void *base, size_t size) { void toku_mempool_init(struct mempool *mp, void *base, size_t size) {
// printf("mempool_init %p %p %d\n", mp, base, size); // printf("mempool_init %p %p %d\n", mp, base, size);
......
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <errno.h> #include "includes.h"
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
typedef void *OMTVALUE;
#include "omt.h"
#include "../newbrt/memory.h"
#include "../newbrt/toku_assert.h"
#include "../include/db.h"
#include "../newbrt/brttypes.h"
typedef u_int32_t node_idx; typedef u_int32_t node_idx;
static const node_idx NODE_NULL = UINT32_MAX; static const node_idx NODE_NULL = UINT32_MAX;
......
...@@ -73,14 +73,14 @@ static inline void rbuf_TXNID (struct rbuf *r, TXNID *txnid) { ...@@ -73,14 +73,14 @@ static inline void rbuf_TXNID (struct rbuf *r, TXNID *txnid) {
*txnid = rbuf_ulonglong(r); *txnid = rbuf_ulonglong(r);
} }
static inline void rbuf_ma_TXNID (struct rbuf *r, MEMARENA ma __attribute__((__unused__)), TXNID *txnid) { static inline void rbuf_ma_TXNID (struct rbuf *r, MEMARENA ma __attribute__((__unused__)), TXNID *txnid) {
return rbuf_TXNID(r, txnid); rbuf_TXNID(r, txnid);
} }
static inline void rbuf_FILENUM (struct rbuf *r, FILENUM *filenum) { static inline void rbuf_FILENUM (struct rbuf *r, FILENUM *filenum) {
filenum->fileid = rbuf_int(r); filenum->fileid = rbuf_int(r);
} }
static inline void rbuf_ma_FILENUM (struct rbuf *r, MEMARENA ma __attribute__((__unused__)), FILENUM *filenum) { static inline void rbuf_ma_FILENUM (struct rbuf *r, MEMARENA ma __attribute__((__unused__)), FILENUM *filenum) {
return rbuf_FILENUM(r, filenum); rbuf_FILENUM(r, filenum);
} }
// Don't try to use the same space, malloc it // Don't try to use the same space, malloc it
......
...@@ -7,20 +7,7 @@ ...@@ -7,20 +7,7 @@
// cd ../src/tests/tmpdir // cd ../src/tests/tmpdir
// ../../../newbrt/recover ../dir.test_log2.c.tdb // ../../../newbrt/recover ../dir.test_log2.c.tdb
#include "cachetable.h" #include "includes.h"
#include "key.h"
#include "brt-internal.h"
#include "log-internal.h"
#include "log_header.h"
#include "toku_assert.h"
#include "kv-pair.h"
#include <fcntl.h>
#include <stdlib.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
//#define DO_VERIFY_COUNTS //#define DO_VERIFY_COUNTS
#ifdef DO_VERIFY_COUNTS #ifdef DO_VERIFY_COUNTS
......
...@@ -3,16 +3,7 @@ ...@@ -3,16 +3,7 @@
/* rollback and rollforward routines. */ /* rollback and rollforward routines. */
#include <stdlib.h> #include "includes.h"
#include <inttypes.h>
#include <sys/stat.h>
#include <unistd.h>
#include "log_header.h"
#include "log-internal.h"
#include "cachetable.h"
#include "key.h"
#include "bread.h"
// these flags control whether or not we send commit messages for // these flags control whether or not we send commit messages for
// various operations // various operations
......
...@@ -158,7 +158,37 @@ check_%: % ...@@ -158,7 +158,37 @@ check_%: %
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
benchmark-test.o: ../brt.h ../brt-search.h ../../include/db.h benchmark-test.o: ../brt.h ../brt-search.h ../../include/db.h
ifeq ($(CIL),1)
BRT_SOURCES = \
block_allocator \
bread \
brt-serialize \
brt-verify \
brt \
cachetable \
fifo \
fingerprint \
key \
leafentry \
log \
log_code \
memory \
memarena \
mempool \
omt \
recover \
roll \
toku_assert \
ybt \
x1764 \
trace_mem \
threadpool \
# keep this line so I can ha vea \ on the previous line
$(BINS): $(patsubst %,../%.o,$(BRT_SOURCES)) $(CYG_ADD_LIBZ)
else
$(BINS): ../newbrt.o $(CYG_ADD_LIBZ) $(BINS): ../newbrt.o $(CYG_ADD_LIBZ)
endif
test-inc-split test-del-inorder: ../brt-test-helpers.o test-inc-split test-del-inorder: ../brt-test-helpers.o
......
#include <stdio.h> #include "includes.h"
#include <stdlib.h>
#include <assert.h>
#include <malloc.h>
#include <pthread.h>
#include <errno.h>
#include "threadpool.h"
// use gcc builtin fetch_and_add 0->no 1->yes // use gcc builtin fetch_and_add 0->no 1->yes
#define DO_ATOMIC_FETCH_AND_ADD 0 #define DO_ATOMIC_FETCH_AND_ADD 0
......
#ifndef THREADPOOL_H
#define THREADPOOL_H
// A threadpool is a limited set of threads that can be used to apply a // A threadpool is a limited set of threads that can be used to apply a
// function to work contained in a work queue. The work queue is outside // function to work contained in a work queue. The work queue is outside
// of the scope of the threadpool; the threadpool merely provides // of the scope of the threadpool; the threadpool merely provides
...@@ -44,3 +47,5 @@ void threadpool_set_thread_idle(THREADPOOL); ...@@ -44,3 +47,5 @@ void threadpool_set_thread_idle(THREADPOOL);
// get the current number of threads // get the current number of threads
int threadpool_get_current_threads(THREADPOOL); int threadpool_get_current_threads(THREADPOOL);
#endif
#include "toku_assert.h" #include "includes.h"
#include <stdio.h>
#include <stdlib.h>
int toku_continue_on_assert_failure=0; int toku_continue_on_assert_failure=0;
......
#include "x1764.h" #include "includes.h"
#include "toku_assert.h"
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#define PRINT 0 #define PRINT 0
......
#define _FILE_OFFSET_BITS 64 #include "includes.h"
#include "ybt.h"
#include "memory.h"
#include <errno.h>
#include <string.h>
DBT *toku_init_dbt (DBT *ybt) { DBT *toku_init_dbt (DBT *ybt) {
memset(ybt, 0, sizeof(*ybt)); memset(ybt, 0, sizeof(*ybt));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment