Commit d94a8bf7 authored by John Esmet's avatar John Esmet

FT-243 Move minicron to util/

parent d0542cb6
......@@ -51,7 +51,6 @@ set(FT_SOURCES
logfilemgr
logger
log_upgrade
minicron
pqueue
quicklz
recover
......
......@@ -93,8 +93,9 @@ PATENT RIGHTS GRANT:
#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 <fcntl.h>
#include "fttypes.h"
#include "minicron.h"
#include "ft/fttypes.h"
#include "util/minicron.h"
// Maintain a cache mapping from cachekeys to values (void*)
// Some of the keys can be pinned. Don't pin too many or for too long.
......
......@@ -96,9 +96,9 @@ PATENT RIGHTS GRANT:
#include <ft/fttypes.h>
#include <ft/ft-ops.h>
#include <ft/minicron.h>
#include <util/growable_array.h>
#include <util/minicron.h>
#include <util/omt.h>
#include <locktree/locktree.h>
......
......@@ -4,6 +4,7 @@ set(util_srcs
kibbutz
memarena
mempool
minicron
partitioned_counter
queue
threadpool
......
......@@ -92,9 +92,8 @@ PATENT RIGHTS GRANT:
#include <errno.h>
#include <string.h>
#include "toku_assert.h"
#include "fttypes.h"
#include "minicron.h"
#include "portability/toku_assert.h"
#include "util/minicron.h"
static void
toku_gettime (toku_timespec_t *a) {
......
......@@ -93,7 +93,6 @@ PATENT RIGHTS GRANT:
#include <toku_pthread.h>
#include <toku_time.h>
#include "fttypes.h"
// Specification:
......
......@@ -90,7 +90,7 @@ PATENT RIGHTS GRANT:
#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 <toku_portability.h>
#include "test.h"
#include "minicron.h"
#include "util/minicron.h"
#include <unistd.h>
#include <string.h>
......@@ -125,7 +125,7 @@ static void*
test1 (void* v)
{
struct minicron m;
ZERO_STRUCT(m);
memset(&m, 0, sizeof(struct minicron));
int r = toku_minicron_setup(&m, 0, never_run, 0); assert(r==0);
sleep(1);
r = toku_minicron_shutdown(&m); assert(r==0);
......@@ -137,7 +137,7 @@ static void*
test2 (void* v)
{
struct minicron m;
ZERO_STRUCT(m);
memset(&m, 0, sizeof(struct minicron));
int r = toku_minicron_setup(&m, 10000, never_run, 0); assert(r==0);
sleep(2);
r = toku_minicron_shutdown(&m); assert(r==0);
......@@ -174,7 +174,7 @@ test3 (void* v)
struct tenx tx;
gettimeofday(&tx.tv, 0);
tx.counter=0;
ZERO_STRUCT(m);
memset(&m, 0, sizeof(struct minicron));
int r = toku_minicron_setup(&m, 1000, run_5x, &tx); assert(r==0);
sleep(5);
r = toku_minicron_shutdown(&m); assert(r==0);
......@@ -197,7 +197,7 @@ static void*
test4 (void *v) {
struct minicron m;
int counter = 0;
ZERO_STRUCT(m);
memset(&m, 0, sizeof(struct minicron));
int r = toku_minicron_setup(&m, 2000, run_3sec, &counter); assert(r==0);
sleep(10);
r = toku_minicron_shutdown(&m); assert(r==0);
......@@ -209,7 +209,7 @@ static void*
test5 (void *v) {
struct minicron m;
int counter = 0;
ZERO_STRUCT(m);
memset(&m, 0, sizeof(struct minicron));
int r = toku_minicron_setup(&m, 10000, run_3sec, &counter); assert(r==0);
toku_minicron_change_period(&m, 2000);
sleep(10);
......@@ -221,7 +221,7 @@ test5 (void *v) {
static void*
test6 (void *v) {
struct minicron m;
ZERO_STRUCT(m);
memset(&m, 0, sizeof(struct minicron));
int r = toku_minicron_setup(&m, 5000, never_run, 0); assert(r==0);
toku_minicron_change_period(&m, 0);
sleep(7);
......@@ -233,8 +233,8 @@ test6 (void *v) {
static void*
test7 (void *v) {
struct minicron m;
memset(&m, 0, sizeof(struct minicron));
int counter = 0;
ZERO_STRUCT(m);
int r = toku_minicron_setup(&m, 5000, run_3sec, &counter); assert(r==0);
sleep(17);
r = toku_minicron_shutdown(&m); assert(r==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