thread.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Private include file ... if we've been configured without gthread, we need
  2. * to point the g_thread_*() and g_mutex_*() functions at our own stubs.
  3. */
  4. /*
  5. This file is part of VIPS.
  6. VIPS is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU Lesser General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Lesser General Public License for more details.
  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., 51 Franklin Street, Fifth Floor, Boston, MA
  17. 02110-1301 USA
  18. */
  19. /*
  20. These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
  21. */
  22. #ifndef VIPS_THREAD_H
  23. #define VIPS_THREAD_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif /*__cplusplus*/
  27. /* We need wrappers over g_mutex_new(), it was replaced by g_mutex_init() in
  28. * glib 2.32+
  29. */
  30. GMutex *vips_g_mutex_new( void );
  31. void vips_g_mutex_free( GMutex * );
  32. /* Same for GCond.
  33. */
  34. GCond *vips_g_cond_new( void );
  35. void vips_g_cond_free( GCond * );
  36. /* ... and for GThread.
  37. */
  38. GThread *vips_g_thread_new( const char *, GThreadFunc, gpointer );
  39. void *vips_g_thread_join( GThread *thread );
  40. gboolean vips_thread_isworker( void );
  41. #ifdef __cplusplus
  42. }
  43. #endif /*__cplusplus*/
  44. #endif /*VIPS_THREAD_H*/