aboutsummaryrefslogtreecommitdiff
path: root/jim-eventloop.h
AgeCommit message (Collapse)AuthorFilesLines
2023-07-04aio: change to use unix io, not stdioSteve Bennett1-0/+2
This changes especially makes buffered I/O work with non-blocking channels. - separate read and write buffering - support for timeout on blocking read - read/write on same channel in event loop with buffering - read buffer is the same across read, gets, copyto - autoflush non-blocking writes via event loop - copyto can now copy to any filehandle-like command - add some copyto tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2020-11-15eventloop: Add convenience functions for adding script file handlersSteve Bennett1-0/+3
Add Jim_CreateScriptFileHandler() to create a standard script filehandler event that evaluates the given script with Jim_EvalObjBackground() when the event occurs. Also add Jim_FindFileHandler() to find a registered event handler. Simplify aio by using these. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-08-17eventloop: Switch to using fd for eventloopSteve Bennett1-2/+2
eventloop doesn't need a filehandle, so so simplify the interface by using file descriptors instead Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-21many comment changes, some small code changesSteve Bennett1-8/+10
Sweep through and clean up all (most) of the comments in the code. While there, adjust some variable and function names to be more consistent, and make a few small code changes - again, mostly for consistency. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-17fix encoding of all files to be utf-8, not latin1Steve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-08-02Correct file handler should be deletedSteve Bennett1-1/+1
Previously, Jim_DeleteFileHandler() would indiscriminately delete the first matching file handler in the list. Instead, it should delete the file handler matching the event mask. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-24Cleanup in jim-eventloopSteve Bennett1-1/+0
"eof" event no longer exists Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-12Remove all trailing whitespace in sourceSteve Bennett1-5/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Licence wording updates.Steve Bennett1-2/+0
Per v0.51, don't refer to the FreeBSD licence Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15eventloop improvements and enhancementsSteve Bennett1-0/+1
Move Jim_EvalObjBackground() out of the core to eventloop Time events are now kept and triggered in time order Time handlers are removed before execution Add 'update' Add 'after info' and 'after idle' Include time events in the return from Jim_ProcessEvents() Add Tcl eventloop tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix some build problems and add lost featuresSteve Bennett1-2/+12
Add some missing files needed for autoconf Make jim build standalone and without host jimsh Use (FILE *) for eventloop file handle Don't expect to support dynlib if no mmu Re-add nvp and win32 support (untested) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Simplify use of eventloopSteve Bennett1-40/+5
Just assume direct static linking for now
2010-10-152009-10-08 Øyvind Harboeoharboe1-5/+40
* jim.c/h: bring in changes from OpenOCD. Warnings and some bug fixes. Copyright list updated in jim.c
2010-10-15Add file and exec (along with subcmd support)Steve Bennett1-5/+5
2010-10-15Strip out unneeded junk from JimSteve Bennett1-40/+5
Nvp, getopt, move interactive processing to jim-interactive.c
2010-10-15Cutover to new workware fork of Jim TclSteve Bennett1-17/+30
Note that this commit removes some files and undoes some commits which will be reapplied later. This is the easiest way to switch across. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2009-10-082009-10-08 Øyvind Harboeoharboe1-30/+17
* jim.c/h: bring in changes from OpenOCD. Warnings and some bug fixes. Copyright list updated in jim.c
2008-07-23 * jim.c: reduce stack usage. Important for embedded devices withoutoharboe1-19/+41
MMU. * jim.c, jim-aio.c, jim-eventloop.c, jim-eventloop.h: emergency repairs to make code compile with eCos after event loops was added. event loop stuff compiles under eCos at least, but this was not tested for regressions.
2008-07-08 * changes to jim-eventloop.[ch]oharboe1-6/+8
* fix negative displacement in timeout computation for select * add basic support for the fileevent stuff [ used from jim-aio ] * add basic support for signal handling / actions * add basic support for timer [via after] restart, cancel and returning the remaining time for cancled events
2008-06-16 * retire CVS keyword expansion. Plays havoc with patches.oharboe1-3/+1
2005-04-18First version of the Jim eventloop extension, exportingantirez1-0/+92
[after], [vwait], and the C API to write other extensions using events. No win32 port for now, just posix. UDP extension will follow shortly and will be the first extension using the event loop.