2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: tstflock.c,v 1.1 2006-03-23 09:15:25 adam Exp $
13 #include <idzebra/flock.h>
18 static char *seqp = seq;
20 void *run_func(void *arg)
23 ZebraLockHandle lh = zebra_lock_create(0, "my.LCK");
34 zebra_lock_destroy(lh);
40 pthread_t child_thread[2];
43 pthread_create(&child_thread[0], 0 /* attr */, run_func, &id1);
44 pthread_create(&child_thread[1], 0 /* attr */, run_func, &id2);
45 pthread_join(child_thread[0], 0);
46 pthread_join(child_thread[1], 0);
50 int main(int argc, char **argv)
52 YAZ_CHECK_INIT(argc, argv);
56 /* does not pass.. for bug 529 */
57 YAZ_CHECK(strcmp(seq, "LULULULU") == 0);
64 * indent-tabs-mode: nil
66 * vim: shiftwidth=4 tabstop=8 expandtab