2012-09-20 07:51:34 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2014-03-02 11:26:40 +04:00
|
|
|
* Copyright (C) Jay Sorg 2004-2014
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* thread calls
|
|
|
|
*/
|
2005-06-28 07:04:36 +04:00
|
|
|
|
|
|
|
#if !defined(THREAD_CALLS_H)
|
|
|
|
#define THREAD_CALLS_H
|
|
|
|
|
2006-11-05 01:05:06 +03:00
|
|
|
#include "arch.h"
|
|
|
|
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2007-02-03 09:17:24 +03:00
|
|
|
tc_thread_create(THREAD_RV (THREAD_CC * start_routine)(void*), void* arg);
|
2017-03-12 19:35:00 +03:00
|
|
|
tbus
|
2007-02-03 09:17:24 +03:00
|
|
|
tc_get_threadid(void);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2008-08-13 11:44:00 +04:00
|
|
|
tc_threadid_equal(tbus tid1, tbus tid2);
|
2017-03-12 19:35:00 +03:00
|
|
|
tbus
|
2007-02-04 10:54:23 +03:00
|
|
|
tc_mutex_create(void);
|
2017-03-12 19:35:00 +03:00
|
|
|
void
|
2007-11-03 10:18:48 +03:00
|
|
|
tc_mutex_delete(tbus mutex);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2007-11-03 10:18:48 +03:00
|
|
|
tc_mutex_lock(tbus mutex);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2007-11-03 10:18:48 +03:00
|
|
|
tc_mutex_unlock(tbus mutex);
|
2017-03-12 19:35:00 +03:00
|
|
|
tbus
|
2007-02-04 10:54:23 +03:00
|
|
|
tc_sem_create(int init_count);
|
2017-03-12 19:35:00 +03:00
|
|
|
void
|
2007-11-03 10:18:48 +03:00
|
|
|
tc_sem_delete(tbus sem);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2007-11-03 10:18:48 +03:00
|
|
|
tc_sem_dec(tbus sem);
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2007-11-03 10:18:48 +03:00
|
|
|
tc_sem_inc(tbus sem);
|
2005-06-28 07:04:36 +04:00
|
|
|
|
|
|
|
#endif
|