diff options
author | jsorg71 <jsorg71> | 2007-02-04 07:53:15 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2007-02-04 07:53:15 +0000 |
commit | 7ed52495d0a5eb4884b8ba5b5eab489433b0a55e (patch) | |
tree | d0f7bad9bb7e15eb8dc87cf9b70c3c78f34fc992 /xrdp/xrdp.c | |
parent | b611452d6be2b186ae536168d5a322d0707643bb (diff) | |
download | xrdp-proprietary-7ed52495d0a5eb4884b8ba5b5eab489433b0a55e.tar.gz xrdp-proprietary-7ed52495d0a5eb4884b8ba5b5eab489433b0a55e.zip |
thread_calls
Diffstat (limited to 'xrdp/xrdp.c')
-rw-r--r-- | xrdp/xrdp.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index 7e95bada..f3ecb38c 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -51,23 +51,23 @@ g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_result; int sync_command; - tc_lock_mutex(g_sync1_mutex); - tc_lock_mutex(g_sync_mutex); + tc_mutex_lock(g_sync1_mutex); + tc_mutex_lock(g_sync_mutex); g_sync_param1 = sync_param1; g_sync_param2 = sync_param2; g_sync_func = sync_func; g_sync_command = 100; - tc_unlock_mutex(g_sync_mutex); + tc_mutex_unlock(g_sync_mutex); do { g_sleep(100); - tc_lock_mutex(g_sync_mutex); + tc_mutex_lock(g_sync_mutex); sync_command = g_sync_command; sync_result = g_sync_result; - tc_unlock_mutex(g_sync_mutex); + tc_mutex_unlock(g_sync_mutex); } while (sync_command != 0); - tc_unlock_mutex(g_sync1_mutex); + tc_mutex_unlock(g_sync1_mutex); return sync_result; } @@ -101,9 +101,9 @@ g_is_term(void) { int rv; - tc_lock_mutex(g_term_mutex); + tc_mutex_lock(g_term_mutex); rv = g_term; - tc_unlock_mutex(g_term_mutex); + tc_mutex_unlock(g_term_mutex); return rv; } @@ -111,9 +111,9 @@ g_is_term(void) void APP_CC g_set_term(int in_val) { - tc_lock_mutex(g_term_mutex); + tc_mutex_lock(g_term_mutex); g_term = in_val; - tc_unlock_mutex(g_term_mutex); + tc_mutex_unlock(g_term_mutex); } /*****************************************************************************/ @@ -128,7 +128,7 @@ pipe_sig(int sig_num) void APP_CC g_loop(void) { - tc_lock_mutex(g_sync_mutex); + tc_mutex_lock(g_sync_mutex); if (g_sync_command != 0) { if (g_sync_func != 0) @@ -140,7 +140,7 @@ g_loop(void) } g_sync_command = 0; } - tc_unlock_mutex(g_sync_mutex); + tc_mutex_unlock(g_sync_mutex); } /* win32 service control functions */ @@ -202,9 +202,9 @@ MyServiceMain(DWORD dwArgc, LPTSTR* lpszArgv) g_set_current_dir("c:\\temp\\xrdp"); g_listen = 0; WSAStartup(2, &w); - g_term_mutex = tc_create_mutex(); - g_sync_mutex = tc_create_mutex(); - g_sync1_mutex = tc_create_mutex(); + g_term_mutex = tc_mutex_create(); + g_sync_mutex = tc_mutex_create(); + g_sync1_mutex = tc_mutex_create(); g_memset(&g_service_status, 0, sizeof(SERVICE_STATUS)); g_service_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS; g_service_status.dwCurrentState = SERVICE_RUNNING; @@ -235,9 +235,9 @@ MyServiceMain(DWORD dwArgc, LPTSTR* lpszArgv) //g_file_write(fd, text, g_strlen(text)); } WSACleanup(); - tc_delete_mutex(g_term_mutex); - tc_delete_mutex(g_sync_mutex); - tc_delete_mutex(g_sync1_mutex); + tc_mutex_delete(g_term_mutex); + tc_mutex_delete(g_sync_mutex); + tc_mutex_delete(g_sync1_mutex); xrdp_listen_delete(g_listen); //CloseHandle(event_han); } @@ -516,13 +516,13 @@ main(int argc, char** argv) g_signal(9, xrdp_shutdown); /* SIGKILL */ g_signal(13, pipe_sig); /* sig pipe */ g_signal(15, xrdp_shutdown); /* SIGTERM */ - g_term_mutex = tc_create_mutex(); - g_sync_mutex = tc_create_mutex(); - g_sync1_mutex = tc_create_mutex(); + g_term_mutex = tc_mutex_create(); + g_sync_mutex = tc_mutex_create(); + g_sync1_mutex = tc_mutex_create(); xrdp_listen_main_loop(g_listen); - tc_delete_mutex(g_term_mutex); - tc_delete_mutex(g_sync_mutex); - tc_delete_mutex(g_sync1_mutex); + tc_mutex_delete(g_term_mutex); + tc_mutex_delete(g_sync_mutex); + tc_mutex_delete(g_sync1_mutex); #if defined(_WIN32) /* I don't think it ever gets here */ WSACleanup(); |