Commit f8bab84f authored by Yoni Fogel's avatar Yoni Fogel

Ported test_db_thread_insert to OSX

git-svn-id: file:///svn/tokudb@1699 c7de825b-a66e-492c-adef-691d508d4ae1
parent fdb91a83
...@@ -25,13 +25,13 @@ int db_put(DB *db, my_t k, my_t v) { ...@@ -25,13 +25,13 @@ int db_put(DB *db, my_t k, my_t v) {
void *do_inserts(void *arg) { void *do_inserts(void *arg) {
struct db_inserter *mywork = (struct db_inserter *) arg; struct db_inserter *mywork = (struct db_inserter *) arg;
printf("%lu:do_inserts:start:%d-%d\n", pthread_self(), mywork->startno, mywork->endno); printf("%lu:do_inserts:start:%d-%d\n", (unsigned long)pthread_self(), mywork->startno, mywork->endno);
my_t i; my_t i;
for (i=mywork->startno; i < mywork->endno; i++) { for (i=mywork->startno; i < mywork->endno; i++) {
int r = db_put(mywork->db, htonl(i), i); assert(r == 0); int r = db_put(mywork->db, htonl(i), i); assert(r == 0);
} }
printf("%lu:do_inserts:end\n", pthread_self()); printf("%lu:do_inserts:end\n", (unsigned long)pthread_self());
pthread_exit(0); pthread_exit(0);
return 0; return 0;
} }
......
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