Commit 0399d06d authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4682 remove cilkarts code from the loader. refs[t:4682]

git-svn-id: file:///svn/toku/tokudb@42090 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1a382c07
......@@ -6,12 +6,9 @@
#ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <c_dialects.h>
#include <brttypes.h>
#include "cachetable.h"
C_BEGIN
/**
* Put an empty node (that is, no fields filled) into the cachetable.
* In the process, write dependent nodes out for checkpoint if
......@@ -129,6 +126,4 @@ toku_unpin_brtnode(BRT brt, BRTNODE node);
void
toku_unpin_brtnode_read_only(BRT brt, BRTNODE node);
C_END
#endif
......@@ -6,9 +6,6 @@
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <brttypes.h>
#include <c_dialects.h>
C_BEGIN
#define ft_flush_before_applying_inbox 1
#define ft_flush_before_child_pin 2
......@@ -161,6 +158,5 @@ default_pick_child_after_split(struct brt_header *h,
int childnumb,
void *extra);
C_END
#endif // End of header guardian.
......@@ -7,9 +7,6 @@
// This must be first to make the 64-bit file mode work right in Linux
#include <brttypes.h>
#include <c_dialects.h>
C_BEGIN
typedef enum {
BRT_FLUSHER_CLEANER_TOTAL_NODES = 0, // total number of nodes whose buffers are potentially flushed by cleaner thread
......@@ -146,6 +143,4 @@ toku_brt_hot_optimize(BRT brt,
int (*progress_callback)(void *extra, float progress),
void *progress_extra);
C_END
#endif // End of header guardian.
......@@ -25,14 +25,11 @@
#include "omt.h"
#include "leafentry.h"
#include "block_table.h"
#include "c_dialects.h"
#include "mempool.h"
#include "compress.h"
// Uncomment the following to use quicklz
C_BEGIN
#ifndef BRT_FANOUT
#define BRT_FANOUT 16
#endif
......@@ -969,6 +966,4 @@ void toku_flusher_thread_set_callback(void (*callback_f)(int, void*), void* extr
void toku_brt_header_note_hot_begin(BRT brt);
void toku_brt_header_note_hot_complete(BRT brt, BOOL success, MSN msn_at_start_of_hot);
C_END
#endif
......@@ -13,11 +13,8 @@
#include "cachetable.h"
#include "log.h"
#include "brt-search.h"
#include "c_dialects.h"
#include "compress.h"
C_BEGIN
// A callback function is invoked with the key, and the data.
// The pointers (to the bytevecs) must not be modified. The data must be copied out before the callback function returns.
// Note: In the thread-safe version, the brt node remains locked while the callback function runs. So return soon, and don't call the BRT code from the callback function.
......@@ -314,6 +311,4 @@ int toku_brt_strerror_r(int error, char *buf, size_t buflen);
extern BOOL garbage_collection_debug;
C_END
#endif
......@@ -113,7 +113,3 @@ int brt_loader_call_poll_function(brtloader_poll_callback p, float progress) {
r = p->poll_function(p->poll_extra, progress);
return r;
}
#if defined(__cplusplus) || defined(__cilkplusplus)
}
#endif
......@@ -10,9 +10,6 @@
#include "queue.h"
#include "toku_pthread.h"
#include "dbufio.h"
#include "c_dialects.h"
C_BEGIN
/* These functions are exported to allow the tests to compile. */
......@@ -202,13 +199,10 @@ int merge_row_arrays_base (struct row dest[/*an+bn*/], struct row a[/*an*/], int
int merge_files (struct merge_fileset *fs, BRTLOADER bl, int which_db, DB *dest_db, brt_compare_func, int progress_allocation, QUEUE);
CILK_BEGIN
int sort_and_write_rows (struct rowset rows, struct merge_fileset *fs, BRTLOADER bl, int which_db, DB *dest_db, brt_compare_func);
int mergesort_row_array (struct row rows[/*n*/], int n, int which_db, DB *dest_db, brt_compare_func, BRTLOADER, struct rowset *);
CILK_END
//int write_file_to_dbfile (int outfile, FIDX infile, BRTLOADER bl, const DESCRIPTOR descriptor, int progress_allocation);
int toku_merge_some_files_using_dbufio (const BOOL to_q, FIDX dest_data, QUEUE q, int n_sources, DBUFIO_FILESET bfs, FIDX srcs_fidxs[/*n_sources*/], BRTLOADER bl, int which_db, DB *dest_db, brt_compare_func compare, int progress_allocation);
......@@ -261,6 +255,4 @@ int brt_loader_lock_init(BRTLOADER bl);
void brt_loader_lock_destroy(BRTLOADER bl);
void brt_loader_set_fractal_workers_count_from_c(BRTLOADER bl);
C_END
#endif
This diff is collapsed.
......@@ -6,10 +6,6 @@
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "c_dialects.h"
C_BEGIN
// The loader callbacks are C functions and need to be defined as such
typedef void (*brt_loader_error_func)(DB *, int which_db, int err, DBT *key, DBT *val, void *extra);
......@@ -46,6 +42,4 @@ void brtloader_set_os_fwrite (size_t (*fwrite_fun)(const void*,size_t,size_t,FIL
size_t brtloader_leafentry_size(size_t key_size, size_t val_size, TXNID xid);
C_END
#endif // BRTLOADER_H
......@@ -6,9 +6,6 @@
#include <toku_portability.h>
#include <toku_pthread.h>
#include "c_dialects.h"
C_BEGIN
/* Maintain a set of files for reading, with double buffering for the reads. */
......@@ -26,6 +23,4 @@ int panic_dbufio_fileset(DBUFIO_FILESET, int error);
void dbufio_print(DBUFIO_FILESET);
C_END
#endif
......@@ -3,10 +3,6 @@
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "c_dialects.h"
C_BEGIN
//
// The kibbutz is another threadpool meant to do arbitrary work.
// It is introduced in Dr. No, and as of Dr. No, the only work kibbutzim
......@@ -38,6 +34,4 @@ void toku_kibbutz_enq (KIBBUTZ k, void (*f)(void*), void *extra);
//
void toku_kibbutz_destroy (KIBBUTZ k);
C_END
#endif
......@@ -6,9 +6,6 @@
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "brttypes.h"
#include "c_dialects.h"
C_BEGIN
// The abstraction:
//
......@@ -53,5 +50,4 @@ int queue_destroy (QUEUE q);
// Requires: The queue must be empty and no consumer should try to dequeue after this (one way to do this is to make sure the consumer saw EOF).
// Returns 0 on success. If the queue is not empty, returns EINVAL. Other errors are likely to be bad (some sort of mutex or condvar failure).
C_END
#endif
......@@ -11,8 +11,6 @@
#include "test.h"
#include "brtloader-internal.h"
C_BEGIN
static int event_count, event_count_trigger;
static void my_assert_hook (void) {
......@@ -536,5 +534,3 @@ int test_main (int argc, const char *argv[]) {
return 0;
}
C_END
......@@ -5,10 +5,6 @@
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "c_dialects.h"
C_BEGIN
// A toku_thread is toku_pthread that can be cached.
struct toku_thread;
......@@ -53,7 +49,4 @@ int toku_thread_pool_run(struct toku_thread_pool *pool, int dowait, int *nthread
// Print the state of the thread pool
void toku_thread_pool_print(struct toku_thread_pool *pool, FILE *out);
C_END
#endif
......@@ -9,9 +9,6 @@
#include <errno.h>
#include "toku_assert.h"
#include "toku_pthread.h"
#include "c_dialects.h"
C_BEGIN
struct workitem;
......@@ -217,7 +214,5 @@ void toku_destroy_workers(WORKQUEUE wq, THREADPOOL *tpptr);
// workers.
void *toku_worker(void *arg);
C_END
#endif
......@@ -8,10 +8,6 @@
#include <toku_list.h>
#include <toku_pthread.h>
#include "c_dialects.h"
C_BEGIN
// The work struct is the base class for work to be done by some threads
struct work {
struct toku_list next;
......@@ -107,6 +103,4 @@ workset_join(struct workset *ws) {
workset_unlock(ws);
}
C_END
#endif
#ifndef C_DIALECTS_H
#define C_DIALECTS_H
#ident "$Id$"
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#if defined(__cplusplus) || defined(__cilkplusplus)
#define C_BEGIN extern "C" {
#define C_END }
#else
#define C_BEGIN
#define C_END
#endif
#if defined(__cilkplusplus)
#define CILK_BEGIN extern "Cilk++" {
#define CILK_END }
#else
#define CILK_BEGIN
#define CILK_END
#endif
#endif
......@@ -5,10 +5,11 @@
/* It evaluates the argument and then calls a function toku_do_assert() which takes all the hits for the branches not taken. */
#include <stdint.h>
#include "c_dialects.h"
#include "errno.h"
C_BEGIN
#if defined(__cplusplus)
extern "C" {
#endif
#ifdef NDEBUG
#error NDEBUG should not be set
......@@ -52,6 +53,8 @@ extern void (*do_assert_hook)(void); // Set this to a function you want called a
#define resource_assert(a) assert(a) // indicates resource must be available, otherwise unrecoverable
#define resource_assert_zero(a) assert_zero(a) // indicates resource must be available, otherwise unrecoverable
C_END
#if defined(__cplusplus)
};
#endif
#endif
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