thread.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2004 Paul Davis
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU Lesser General Public License as published by
00006     the Free Software Foundation; either version 2.1 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public License
00015     along with this program; if not, write to the Free Software
00016     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 
00018 */
00019 
00020 #ifndef __jack_thread_h__
00021 #define __jack_thread_h__
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 #include <pthread.h>
00028 #include <jack/weakmacros.h>
00029 
00030 /* use 512KB stack per thread - the default is way too high to be feasible 
00031  * with mlockall() on many systems */
00032 #define THREAD_STACK 524288
00033        
00052 int jack_client_real_time_priority (jack_client_t*) JACK_OPTIONAL_WEAK_EXPORT;
00053 
00060 int jack_client_max_real_time_priority (jack_client_t*) JACK_OPTIONAL_WEAK_EXPORT;
00061 
00072 int jack_acquire_real_time_scheduling (pthread_t thread, int priority) JACK_OPTIONAL_WEAK_EXPORT;
00073 
00090 int jack_client_create_thread (jack_client_t* client,
00091                                pthread_t *thread,
00092                                int priority,
00093                                int realtime,    /* boolean */
00094                                void *(*start_routine)(void*),
00095                                void *arg) JACK_OPTIONAL_WEAK_EXPORT;
00096 
00104 int jack_drop_real_time_scheduling (pthread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
00105 
00106 typedef int (*jack_thread_creator_t)(pthread_t*,
00107                                      const pthread_attr_t*,
00108                                      void* (*function)(void*),
00109                                      void* arg) JACK_OPTIONAL_WEAK_EXPORT;
00127 void jack_set_thread_creator (jack_thread_creator_t creator) JACK_OPTIONAL_WEAK_EXPORT;
00128 
00129 /* @} */
00130 
00131 #ifdef __cplusplus
00132 }
00133 #endif
00134 
00135 #endif /* __jack_thread_h__ */
00136 

Generated for JACK-AUDIO-CONNECTION-KIT by  doxygen1.6.1