1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2010 Index Data
3 * See the file LICENSE for details.
14 static void tst_mutex(void)
22 yaz_mutex_destroy(&p);
27 yaz_mutex_set_name(p, YLOG_LOG, "mymutex");
30 yaz_mutex_destroy(&p);
33 yaz_mutex_destroy(&p); /* OK to "destroy" NULL handle */
36 static void tst_cond(void)
40 struct timespec abstime;
54 r = gettimeofday(&tval, 0);
57 abstime.tv_sec = tval.tv_sec + 1; /* wait 2 seconds */
58 abstime.tv_nsec = tval.tv_usec * 1000;
60 r = yaz_cond_wait(c, p, &abstime);
65 yaz_mutex_destroy(&p);
69 int main (int argc, char **argv)
71 YAZ_CHECK_INIT(argc, argv);
81 * c-file-style: "Stroustrup"
82 * indent-tabs-mode: nil
84 * vim: shiftwidth=4 tabstop=8 expandtab