1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2010 Index Data
3 * See the file LICENSE for details.
19 #include <yaz/gettimeofday.h>
21 static void tst_mutex(void)
29 yaz_mutex_destroy(&p);
34 yaz_mutex_set_name(p, YLOG_LOG, "mymutex");
37 yaz_mutex_destroy(&p);
40 yaz_mutex_destroy(&p); /* OK to "destroy" NULL handle */
43 static void tst_cond(void)
47 struct timeval abstime;
60 r = yaz_gettimeofday(&abstime);
63 abstime.tv_sec += 1; /* wait 1 second */
65 r = yaz_cond_wait(c, p, &abstime);
70 yaz_mutex_destroy(&p);
74 int main (int argc, char **argv)
76 YAZ_CHECK_INIT(argc, argv);
86 * c-file-style: "Stroustrup"
87 * indent-tabs-mode: nil
89 * vim: shiftwidth=4 tabstop=8 expandtab