Jack2  1.9.10
thread.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2004 Paul Davis
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU Lesser General Public License as published by
6  the Free Software Foundation; either version 2.1 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 
18 */
19 
20 #ifndef __jack_thread_h__
21 #define __jack_thread_h__
22 
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27 
28 #include <jack/systemdeps.h>
29 #include <jack/weakmacros.h>
30 
31 /* use 512KB stack per thread - the default is way too high to be feasible
32  * with mlockall() on many systems */
33 #define THREAD_STACK 524288
34 
53 int jack_client_real_time_priority (jack_client_t*) JACK_OPTIONAL_WEAK_EXPORT;
54 
61 int jack_client_max_real_time_priority (jack_client_t*) JACK_OPTIONAL_WEAK_EXPORT;
62 
73 int jack_acquire_real_time_scheduling (jack_native_thread_t thread, int priority) JACK_OPTIONAL_WEAK_EXPORT;
74 
91 int jack_client_create_thread (jack_client_t* client,
92  jack_native_thread_t *thread,
93  int priority,
94  int realtime, /* boolean */
95  void *(*start_routine)(void*),
96  void *arg) JACK_OPTIONAL_WEAK_EXPORT;
97 
105 int jack_drop_real_time_scheduling (jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
106 
114 int jack_client_stop_thread(jack_client_t* client, jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
115 
123  int jack_client_kill_thread(jack_client_t* client, jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
124 
125 #ifndef WIN32
126 
127  typedef int (*jack_thread_creator_t)(pthread_t*,
128  const pthread_attr_t*,
129  void* (*function)(void*),
130  void* arg);
150 void jack_set_thread_creator (jack_thread_creator_t creator) JACK_OPTIONAL_WEAK_EXPORT;
151 
152 #endif
153 
154 /* @} */
155 
156 #ifdef __cplusplus
157 }
158 #endif
159 
160 #endif /* __jack_thread_h__ */
int jack_client_real_time_priority(jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT
int jack_client_stop_thread(jack_client_t *client, jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT
int jack_acquire_real_time_scheduling(jack_native_thread_t thread, int priority) JACK_OPTIONAL_WEAK_EXPORT
int jack_client_max_real_time_priority(jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT
void jack_set_thread_creator(jack_thread_creator_t creator) JACK_OPTIONAL_WEAK_EXPORT
int jack_client_create_thread(jack_client_t *client, jack_native_thread_t *thread, int priority, int realtime, void *(*start_routine)(void *), void *arg) JACK_OPTIONAL_WEAK_EXPORT
int jack_drop_real_time_scheduling(jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT
int jack_client_kill_thread(jack_client_t *client, jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT

Generated for Jack2 by doxygen 1.8.11