Commit 55df06e7 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1665 Windows port of minicron

git-svn-id: file:///svn/toku/tokudb@11334 c7de825b-a66e-492c-adef-691d508d4ae1
parent fd2d01ab
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#ident "$Id:$" #ident "$Id:$"
#include "toku_portability.h"
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include "toku_assert.h" #include "toku_assert.h"
#include "brttypes.h" #include "brttypes.h"
#include "minicron.h" #include "minicron.h"
#include "toku_portability.h"
static void static void
toku_gettime (struct timespec *a) { toku_gettime (struct timespec *a) {
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
// and the call is rescheduled. (If the time since f finished is more than the new period, then f is called immediately). // and the call is rescheduled. (If the time since f finished is more than the new period, then f is called immediately).
struct minicron { struct minicron {
pthread_t thread; toku_pthread_t thread;
struct timespec time_of_last_call_to_f; struct timespec time_of_last_call_to_f;
pthread_mutex_t mutex; toku_pthread_mutex_t mutex;
pthread_cond_t condvar; toku_pthread_cond_t condvar;
int (*f)(void*); int (*f)(void*);
void *arg; void *arg;
u_int32_t period_in_seconds; u_int32_t period_in_seconds;
......
...@@ -85,7 +85,11 @@ typedef int64_t toku_off_t; ...@@ -85,7 +85,11 @@ typedef int64_t toku_off_t;
#if !defined(TOKU_ALLOW_DEPRECATED) #if !defined(TOKU_ALLOW_DEPRECATED)
# if defined(__ICL) //Windows Intel Compiler # if defined(__ICL) //Windows Intel Compiler
# pragma deprecated (creat, fstat, stat, getpid, syscall, sysconf, mkdir, strdup) # pragma deprecated (creat, fstat, stat, getpid, syscall, sysconf, mkdir, strdup)
# pragma poison off_t # pragma poison off_t
# pragma poison pthread_attr_t pthread_t
# pragma poison pthread_mutexattr_t pthread_mutex_t
# pragma poison pthread_condattr_t pthread_cond_t
# pragma poison pthread_rwlockattr_t pthread_rwlock_t
# ifndef DONT_DEPRECATE_MALLOC # ifndef DONT_DEPRECATE_MALLOC
# pragma deprecated (malloc, free, realloc) # pragma deprecated (malloc, free, realloc)
# 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