1. pthread

$Log: flx_pthread.pak,v $ Revision 1.35 2006/08/05 07:13:47 skaller add pthread switch to flx_pthread.fpc Revision 1.34 2006/08/04 07:07:08 skaller get rid of debugging stuff Revision 1.33 2006/07/19 17:57:52 rfistman wrote self pipe for windows, not happy with it though because it has to use a named pipe (anon pipes don't work in nonblock mode). made demux_quitter portable and now quitting iocp demuxer cleanly added demux callbacks which are currently used for quitting and making demuxers responsive to new sockets. fixed unbalanced quote in ./bin/flx script Revision 1.29 2006/07/16 10:14:36 rfistman added some printfs to diagnose thread creation probs Revision 1.28 2006/07/05 07:36:42 skaller Fiddles to speed test Revision 1.27 2006/06/26 10:18:13 rfistman fixed a few typos "provide_lib" -> "provides_lib". this was stopping things building in the right order (e.g. libflx being built after the code that needed it). Revision 1.26 2006/06/24 11:49:49 skaller Fix dependencies on flx_gc for Cygwin. Revision 1.25 2006/05/07 08:08:04 idadesub actually, this test cannot be checked yet, as it's non-deterministic Revision 1.24 2006/05/07 07:19:38 idadesub adding expected output for test Revision 1.23 2006/05/03 08:38:54 idadesub generating more documents. moved a couple of the rtl felix-specific projects into the flx_ namespace in order to keep things separate from the docs for other non-felix projects Revision 1.22 2006/04/25 10:38:42 rfistman added solaris libs (-lrt for semaphores, -lnsl, -lsocket) missing from some pkgs and added -lnsl -lsocket to flx_pkgconfig bootstrap, added missing namespace to evtport demuxer Revision 1.21 2006/04/18 05:25:45 skaller Rewrite sleep queue. Revision 1.20 2006/04/17 08:20:26 skaller needs assert.h Revision 1.19 2006/04/17 07:19:59 skaller Make monitor slightly more efficient Revision 1.18 2006/04/16 04:49:10 skaller Maybe fixed monitor to allow for spurious condition variable wait exits. Revision 1.17 2006/04/15 04:20:05 rfistman fixed bug in sleep queue in which an empty stack could be popped thanks to a spurious condition var wakeup. condition var predicates must be rechecked! Revision 1.16 2006/04/08 08:18:34 rfistman fixed up flx_listener, working on portable regression test for tcp bug still at large in nocygwin flx_accept - hope it's portable! Revision 1.15 2006/03/15 10:22:59 rfistman fixing 64bit cl build Revision 1.14 2006/03/10 15:48:24 skaller Add pretty printer for C++. Revision 1.13 2006/03/08 22:30:49 skaller Add requires package "flx_pthread" to module Pthread Revision 1.12 2006/03/08 14:51:16 skaller Tests for pthreads, callbacks. Revision 1.11 2006/03/08 07:15:54 skaller Async channels now working Revision 1.10 2006/03/07 04:22:36 skaller Termination in presence of spawned pthreads should now be working, using new ts_locker class. Exception handling on per thread basis not implemented yet. Revision 1.9 2006/03/06 13:16:17 skaller Fix library builds so exports and imports are properly distinguished on a library by library basis. Revision 1.8 2006/03/06 03:28:52 skaller Win32 detached threads (same as joinable ones really) Revision 1.7 2006/03/06 03:20:11 rfistman fixed typo in win32 stuff Revision 1.6 2006/03/06 01:29:29 skaller spawn_pthread: init works Revision 1.5 2006/03/05 07:52:41 skaller Add detached threads, to be used for job queues. Revision 1.4 2006/03/04 17:29:11 skaller Polymorphic reductions working! Revision 1.3 2006/03/02 02:41:39 skaller Fixes for Win32/MSVC++ build. Revision 1.2 2006/03/01 13:43:17 skaller COnfig packages now seem to work on Linux. Added dependency on libflx to flx_pthread. Revision 1.1 2006/02/28 02:07:13 skaller Refactor demux into demux + pthread.
Start data section to config/flx_pthread.fpc[1 /1 ]
     1: Name: pthread
     2: Description: Pre-emptive threading support
     3: Version: $Id: flx_pthread.pak,v 1.35 2006/08/05 07:13:47 skaller Exp $
     4: 
     5: provides_dlib: -lflx_pthread_dynamic
     6: provides_slib: -lflx_pthread_static
     7: requires_dlibs: -lpthread 
     8: requires_slibs: -lpthread 
     9: Requires: flx_gc
    10: 
End data section to config/flx_pthread.fpc[1]
Start python section to spkgs/flx_pthread.py[1 /1 ]
     1: #line 142 "./lpsrc/flx_pthread.pak"
     2: 
     3: PTHREADRTL_INTERFACES = [
     4:  'pthread/pthread_thread.hpp',        # portable
     5:  'pthread/pthread_win_posix_condv_emul.hpp',         # win32 and posix
     6:  'pthread/pthread_mutex.hpp',         # portable
     7:  'pthread/pthread_counter.hpp',       # portable
     8:  'pthread/pthread_condv.hpp',         # portable
     9:  'pthread/pthread_semaphore.hpp',     # portable
    10:  'pthread/pthread_monitor.hpp',       # portable
    11:  'pthread/pthread_sleep_queue.hpp',   # portable
    12:  'pthread/pthread_work_fifo.hpp',     # portable
    13: ]
    14: 
    15: PTHREAD_CPPS = [
    16:   "pthread/pthread_win_posix_condv_emul", # portability hackery
    17:   "pthread/pthread_mutex",
    18:   "pthread/pthread_condv",
    19:   "pthread/pthread_counter",
    20:   "pthread/pthread_semaphore",
    21:   "pthread/pthread_monitor",
    22:   "pthread/pthread_sleep_queue",
    23:   "pthread/pthread_work_fifo",
    24:   "rtl/flx_ts_collector",
    25: ]
    26: 
    27: POSIX_PTHREAD_CPPS = [
    28:   'pthread/pthread_posix_thread',
    29: ]
    30: 
    31: LINUX_PTHREAD_CPPS = [
    32: ]
    33: 
    34: SOLARIS_PTHREAD_CPPS = [
    35: ]
    36: 
    37: WINDOWS_PTHREAD_CPPS = [
    38:   'pthread/pthread_win_thread',
    39: ]
    40: 
    41: BSD_PTHREAD_CPPS = [
    42: ]
    43: 
    44: EXTRA_SYS_LIBS = ""
    45: if WIN32:
    46:   PTHREAD_CPPS = PTHREAD_CPPS + WINDOWS_PTHREAD_CPPS
    47: 
    48: if POSIX:
    49:   PTHREAD_CPPS = PTHREAD_CPPS + POSIX_PTHREAD_CPPS
    50: 
    51: if LINUX:
    52:   PTHREAD_CPPS = PTHREAD_CPPS + LINUX_PTHREAD_CPPS
    53: 
    54: if BSD or MACOSX:
    55:   PTHREAD_CPPS = PTHREAD_CPPS + BSD_PTHREAD_CPPS
    56: 
    57: if SOLARIS:
    58:   PTHREAD_CPPS = PTHREAD_CPPS + SOLARIS_PTHREAD_CPPS
    59:   EXTRA_SYS_LIBS = "-lrt " # man sem_wait
    60: 
    61: cpp_cpps = PTHREAD_CPPS
    62: rtl_interfaces = PTHREADRTL_INTERFACES
    63: lib_requires = ['libflx_gc']
    64: dflags = EXTRA_SYS_LIBS
    65: sflags = EXTRA_SYS_LIBS
    66: pkg_requires = ['flx_rtl'] # flx_rtl provides flx_rtl_config.hpp
    67: iscr_source = ["lpsrc/flx_pthread.pak"]
    68: build_macro = "PTHREAD"
    69: weaver_directory = 'doc/rtl/flx_pthread/'
    70: 
End python section to spkgs/flx_pthread.py[1]
Start cpp section to rtl/flx_pthread_config.hpp[1 /1 ]
     1: #line 213 "./lpsrc/flx_pthread.pak"
     2: #ifndef __FLX_PTHREAD_CONFIG_GUARD__
     3: #define __FLX_PTHREAD_CONFIG_GUARD__
     4: #include "flx_rtl_config.hpp"
     5: #ifdef BUILD_PTHREAD
     6: #define PTHREAD_EXTERN FLX_EXPORT
     7: #else
     8: #define PTHREAD_EXTERN FLX_IMPORT
     9: #endif
    10: #endif
    11: 
End cpp section to rtl/flx_pthread_config.hpp[1]