1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2009 Index Data
3 * See the file LICENSE for details.
13 #include <yaz/options.h>
19 static void *t_loop2(void *vp)
23 for (i = 0; i<sz; i++)
26 fprintf(stderr, "pr %d\n", i);
28 yaz_log(YLOG_LOG, "pr %d", i);
34 static void t_test(void)
38 pthread_create(tids+0, 0, t_loop2, 0);
39 pthread_create(tids+1, 0, t_loop2, 0);
40 pthread_create(tids+2, 0, t_loop2, 0);
41 pthread_create(tids+3, 0, t_loop2, 0);
43 pthread_join(tids[0], 0);
44 pthread_join(tids[1], 0);
45 pthread_join(tids[2], 0);
46 pthread_join(tids[3], 0);
50 static void t_test(void)
56 int main(int argc, char **argv)
61 /* t_test is only invoked if a non-option arg is given .. */
62 while ((ret = options("v:l:", argv, argc, &arg)) != -2)
67 yaz_log_init_level (yaz_log_mask_str(arg));
70 yaz_log_init_file(arg);
84 * c-file-style: "Stroustrup"
85 * indent-tabs-mode: nil
87 * vim: shiftwidth=4 tabstop=8 expandtab