#include <assert.h>
#include "midas.h"
#include "msystem.h"
Go to the source code of this file.
◆ main()
Definition at line 85 of file odb_lock_test.cxx.
86{
94
96
99
103
105
108
111
112 return 0;
113}
INT cm_get_experiment_database(HNDLE *hDB, HNDLE *hKeyClient)
INT cm_connect_experiment1(const char *host_name, const char *default_exp_name, const char *client_name, void(*func)(char *), INT odb_size, DWORD watchdog_timeout)
INT cm_disconnect_experiment(void)
INT cm_get_environment(char *host_name, int host_name_size, char *exp_name, int exp_name_size)
INT cm_set_watchdog_params(BOOL call_watchdog, DWORD timeout)
char host_name[HOST_NAME_LENGTH]
char expt_name[NAME_LENGTH]
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
◆ test1()
Definition at line 14 of file odb_lock_test.cxx.
15{
16 printf(
"test1: test recursive ODB lock\n");
34}
INT db_lock_database(HNDLE hDB)
INT db_unlock_database(HNDLE hDB)
◆ test2()
Definition at line 56 of file odb_lock_test.cxx.
57{
58
59
60 printf(
"test2: test multithread locking\n");
63 printf(
"t0: lock1 done\n");
72 printf(
"t0: lock2 done\n");
75 printf(
"t0: unlock2 done\n");
76 printf(
"t0: waiting for thread1...\n");
80 }
82
83}
midas_thread_t ss_thread_create(INT(*thread_func)(void *), void *param)
◆ thread1()
◆ xhDB
◆ xThread1done