1. Run time driver support library
$Log: flx_rtl.pak,v $
Revision 1.60 2006/08/04 07:07:08 skaller
get rid of debugging stuff
Revision 1.59 2006/07/25 07:21:46 idadesub
rolling back shaller's fix since it doesn't work :(
Revision 1.58 2006/07/25 04:18:04 idadesub
fix indenting
Revision 1.57 2006/07/25 03:53:48 skaller
Add workaround for OSX 10.2 locale initialisation bug.
Revision 1.56 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.55 2006/07/14 16:00:29 rfistman
generalised demux quit flag into a condition variable that is picked up and
signalled just before the event thread exits. this was yet another race
condition in which a quit and destructed demuxer was still in use by
its event thread.
made get/set quit flag virtual so that "ts" style demuxers (those that
encapsulate a non ts demuxer) report the quit flag properly.
factored kqueue quit into async_quit for making sure that waiting thread
in thread safe demuxers exits before the demuxer destructor completes.
affects ts_poll_demuxer, ts_select_demuxer, evtport_demuxer
still to do: same for iocp_demuxer.
Revision 1.54 2006/07/10 11:33:47 skaller
Add source locations in new module Debug.
Revision 1.53 2006/07/08 16:04:32 rfistman
explicitly ignoring return val of SetErrorMode in flx_rtl.pak
made configure script appear executable under cygwin/bash/fat32
removed simpleline_server which didn't do anything
Revision 1.52 2006/07/07 22:54:17 skaller
Make some files which used to be part of the compiler pak but
actually aren't part of the compiler into separate paks.
Revision 1.51 2006/07/04 14:30:42 skaller
Make svc_collect stop the world whilst collecting,
to ensure all Felix pthreads have empty machine stacks,
and don't modify the heap whilst collection is in progress.
In this mod, auto-collection is entirely disabled.
Thread check for world stop only when an async I/O request
or collection request is made. Both these latter conditions
may be modified in the future.
Revision 1.50 2006/06/28 22:49:41 skaller
Fixed it again. There was a syntax error. Somehow, the make script
still proceeded???????
Revision 1.49 2006/06/28 22:45:23 skaller
Fix disasterous bug in flx_run_pthread where somehow CVS acquired
a commented out pointer initialisation.
Revision 1.48 2006/06/28 02:59:24 skaller
Fix compiler selection for host build to check for win64 as well as win32
Revision 1.47 2006/06/25 22:55:09 skaller
Fix spelling error which caused wrong library name to be built.
Revision 1.46 2006/06/24 11:49:49 skaller
Fix dependencies on flx_gc for Cygwin.
Revision 1.45 2006/06/22 12:44:25 skaller
Split gc off into separate library.
Revision 1.44 2006/06/22 07:21:30 rfistman
updated mkdemux.py. hopefully it won't be needed soon, as
flx_demux becomes the "main" demux.
added poll ts_poll demuxer.
conditionalised demuxer usage, so linux no longer implies epoll,
and solaris no longer implies evtports. this means that older
systems will fall back to select and that we may get the rare
nice surprise of finding a system that supports an unusual
demuxer (like osx10.4 with poll) or a linux with kqueues. who knows.
Revision 1.43 2006/06/11 19:38:14 idadesub
added support a c compiler as well
the builders have been massively refactored to reduce code duplication
renamed some functions and arguments to be clearer on intent
eliminated empty "except:" clauses. It's possible I'm not catching all the
right exceptions though.
fixed a couple bugs
Revision 1.42 2006/05/30 18:53:22 rfistman
fixed exception handler linkage on win32
flx_rtl_config now stops Windows.h on VS toolchain including winsock vers 1
disabled HAVE_ISBLANK in tre config file to unbreak win32 build
removed async bootstrapping from pkg_config as it's no longer needed
Revision 1.41 2006/05/20 15:38:09 rfistman
fixed win32 typo
Revision 1.40 2006/05/19 08:54:25 skaller
Scripts should now all work without dependence on async.
Revision 1.39 2006/05/18 08:59:57 skaller
Fixed make script so static link tests work. It's a hack,
static link now requires async to work (the version that
doesn't is clobbered .. the make system provides no
way to named the object file different from the input
source file).
Revision 1.38 2006/05/18 05:10:10 rfistman
fixed mac dylib extension thing
Revision 1.37 2006/05/18 03:23:41 skaller
update drivers with hack. Known to be bugged, sorry,
but without these updates the system won't build at all.
Static linked programs using async will not work.
Revision 1.36 2006/05/17 04:33:46 skaller
For dynamic linkage, flx_run is no longer linked against
flx_async. Instead, it is loaded on demand. At this stage,
static links still need to be linked against it (to be fixed
soon). At this point only tested on Linux.
Revision 1.35 2006/05/05 06:01:02 skaller
Add handler to flx_run for C++ standard exceptions.
Revision 1.34 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.33 2006/04/30 02:09:37 rfistman
got rid of suckitnsee kqueue config (too complicated with pthread use)
added a quitter to ts_select_demuxer to fix crash
fixed string exception in demo web server caused by POSTs
Revision 1.32 2006/04/22 07:43:37 rfistman
taking down kqueue event source was blocking on osx 10.4.
fixed now, but not perfect yet. similar problems exist with other sources,
giving undefined behaviour (I believe) on takedown. watch this space.
Revision 1.31 2006/04/08 03:53:44 skaller
Detect vsnprintf.. some Windows don't provide it even though
MSDN says it is available. The MS variation when available
doesn't work correctly anyhow.
Revision 1.30 2006/04/05 01:01:11 skaller
New variant type and other stuff accumulated during CVS outage.
Revision 1.29 2006/03/30 01:59:30 skaller
Add C prinf formatting stuff
Revision 1.28 2006/03/27 16:43:04 skaller
Add axiom_check pseudo function for checking axioms.
Revision 1.27 2006/03/24 02:46:26 skaller
Change case n of m to zero origin. Looks horrible but more
consistent.
Revision 1.26 2006/03/22 15:50:24 skaller
Add range check function to RTL, coercions to unitsums to
language.
Revision 1.25 2006/03/18 01:26:35 rfistman
fixed FLXIMPORT doing a dllexport on windows
made pthread and flx_async libs use their own BLAH_EXTERN directives
Revision 1.24 2006/03/15 12:59:57 skaller
Add HAVE_LONG and HAVE_LONGDOUBLE to flx_rtl_config.hpp for elkhound
Revision 1.23 2006/03/10 15:48:24 skaller
Add pretty printer for C++.
Revision 1.22 2006/03/08 07:15:54 skaller
Async channels now working
Revision 1.21 2006/03/07 09:07:17 skaller
Add --lparchive option to specify where LP source .paks
live
Revision 1.20 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.19 2006/03/06 23:24:39 rfistman
added conditional winsock initialisation back to flx_run. it's too late
once a win32 flx app executes an async call.
Revision 1.18 2006/03/06 15:08:08 skaller
Cygwin and MinGW builds.
Revision 1.17 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.16 2006/03/06 06:30:18 idadesub
added a forward declaration of do_final_cleanup, and fixed arguments being
passed in the wrong order
Revision 1.15 2006/03/06 03:28:52 skaller
Win32 detached threads (same as joinable ones really)
Revision 1.14 2006/03/06 01:29:29 skaller
spawn_pthread: init works
Revision 1.13 2006/03/05 07:52:41 skaller
Add detached threads, to be used for job queues.
Revision 1.12 2006/03/05 00:50:52 skaller
Fix flx_async to depend on libfaio, libdemux, etc.
Revision 1.11 2006/03/05 00:14:15 rfistman
using new demux selecter logic (suckit'n'see)
Revision 1.10 2006/03/04 21:07:36 rfistman
MACOSX != Kqueues.
Revision 1.9 2006/03/04 09:50:42 rfistman
added "suck it and see" for kqueues.
Revision 1.8 2006/03/04 07:28:20 skaller
Decouple flx_run from faio and demux, except for hook creator.
Revision 1.7 2006/03/04 04:26:41 rfistman
making demux configure more "suck it and see". temporarily disabled kqueues
whilst fixing osx 10.2 build.
Revision 1.6 2006/03/02 20:42:06 skaller
Nocygwin build, flx_pkgconfig.
Revision 1.5 2006/03/02 17:52:52 skaller
Fix flx_pkgconfig to handle linker switches
Revision 1.4 2006/02/28 02:07:13 skaller
Refactor demux into demux + pthread.
Revision 1.3 2006/02/26 06:39:36 skaller
Fix flx_pkgconfig to conform to new spec.
Revision 1.2 2006/02/23 19:33:01 skaller
More fiddling with build system
Revision 1.1 2006/02/22 17:36:49 skaller
Rename some files.. more coming. Make RTL modules full .paks
Revision 1.116 2006/02/20 10:50:16 skaller
Mingw static tests
Revision 1.115 2006/02/19 16:04:57 skaller
Win32 build changes..seems to work now
Revision 1.114 2006/02/16 23:59:10 rfistman
switched mac build back to kqueues, was using thread safe select
Revision 1.113 2006/02/16 23:39:11 rfistman
fixed cygwin hang in posix tests. cygwin wakes select with an error flag
when you shutdown a socket. other impls seem to wake select, but with no
error.
Revision 1.112 2006/02/16 15:36:04 skaller
Fix flx_sync to not use ts_collector (only needs gc).
Revision 1.111 2006/02/16 15:19:28 skaller
MSVC++ fixes
Revision 1.110 2006/02/16 07:51:40 skaller
Replace pkg-config with a Felix program flx_pkgconfig.
Make sure to build it in a timely manner, since flx script
now depends on it.
Revision 1.109 2006/02/15 10:54:09 skaller
Build time packaging system.
Revision 1.108 2006/02/15 04:10:56 rfistman
working on thread safe select demuxer (ts_select_demuxer). that should
fix cygwin probs. and as yet other undiscovered problems.
Revision 1.107 2006/02/13 20:12:53 skaller
Add chain thru shape objects to allow collector to specialise
allocations on a type basis.
Revision 1.106 2006/02/13 03:30:38 skaller
Change top level calling structure in flx_run in preparation
for launching detached pthreads which can run Felix.
Revision 1.105 2006/02/12 04:25:40 skaller
Fix long standing cygwin build problem (workaround for libstdc++ bug).
Revision 1.104 2006/02/10 21:55:34 skaller
Sdl examples now run on Windows
Revision 1.103 2006/02/10 04:40:26 skaller
Win32 rtl patches
Revision 1.102 2006/02/09 21:05:33 skaller
Fixed sdl to use polling.
Revision 1.101 2006/02/08 16:19:43 skaller
Changed flx_run so it executes an exported flx_main procedure
after thread frame initialisation blocks (and thus before
async wakes up any fthreads)
Revision 1.100 2006/02/06 06:50:01 skaller
Added pthread_cond_timedwait and pthread_cond_uswait functions
to condition variables. The latter is my own invention, it waits
for a specific interval in micro-seconds. The later is more
efficient on Windows when you want to wait for an interval,
since this is the native method. Otherwise you need to first
obtain the time of day, do a nasty calculation .. and then
the timedwait function will undo that, resulting in two
unnecessary and expensive system calls.
Revision 1.99 2006/02/04 11:34:36 skaller
Portable demux stuff, Win32 version
Revision 1.98 2006/02/04 10:35:55 skaller
Portable thread sync stuff
Revision 1.97 2006/02/02 15:29:32 skaller
Factor flx_run.
Revision 1.96 2006/02/02 08:30:17 rfistman
got rid of annoying debug output/note to self regarding sigpipe on osx/bsd.
made flx_rtl create async structure on demand, if only to avoid all that
debug output in the simpler tests.
Revision 1.95 2006/02/02 06:19:23 skaller
Factor flx_run more.
Revision 1.94 2006/01/30 08:58:19 skaller
Add package support to flx script
Revision 1.93 2006/01/29 05:58:08 rfistman
fixed windows build (ming nocygwin) after merge
Revision 1.92 2006/01/29 02:53:17 rfistman
fixed missing epoll header for linux.:w
Revision 1.91 2006/01/29 02:17:29 rfistman
using latest demux, added epoll to flx_run (for linux). bugs fixed.
Revision 1.90 2006/01/27 11:44:13 skaller
Fix bug in schannel shape object.
Revision 1.89 2006/01/27 08:40:11 skaller
Moved main driver loop out of mainline in preparation for
librar-ising it. Added separate debug switches for allocation,
collection, and driver diagnostics.
Revision 1.88 2006/01/25 18:39:55 skaller
Add mutex to protect SDL event source. Deploy in sdl110.
Fix bug in rtl, was allocating an slist_t but telling the
gc the shape was an slist_node_t, gc now runs and checks in sdl110.
Revision 1.87 2006/01/24 19:15:49 skaller
Add openGL test sdl110. Currently crashes in gc.
Add async request counter to driver.
Add configuration hack for openGL.
Revision 1.86 2006/01/19 17:26:44 skaller
Add sound to SDL example. Fix serious bug in synchronous
channel I/O operations.
Revision 1.85 2006/01/18 01:50:25 skaller
Fix bug in root_ptr_t class with overloads of operator->
Revision 1.84 2006/01/11 04:30:45 rfistman
added portable sleep
Revision 1.83 2006/01/05 09:43:46 skaller
Compile procedures down to plain C functions if possible.
Optimisation may be a bit optimistic.
Revision 1.82 2006/01/03 16:15:10 skaller
Changed all print functions to fprint, which requires an
ostream as first argument. Provide macro print to support
existing code. Note overloads on print will not work.
Procedures objects can now be created on the stack,
such procedures have no resume method.
Revision 1.81 2006/01/03 04:29:21 rfistman
fixed win32 tests by a) initing winsock in flx_run and using
the correct return value.
Revision 1.80 2006/01/01 09:04:55 rfistman
made a few solaris style changes (own demuxer and a few build
incompatibilities fixed)
Revision 1.79 2005/12/29 18:16:04 skaller
Namespaces and modules added ..
Revision 1.78 2005/12/29 13:52:07 skaller
Added log to rtl and faio.
This package contains core types and routines
to facilitate construction of drivers for
felix shared libraries. A felix driver is the top
level interface between the embedding application
and the felix generated shared libraries.
The code we give is platform independent, except as noted.
The code all lives in directory rtl, the run time
library support directory. The symbols are defined
in namespace flx::rtl, except as noted.