Juan Jose Garcia Ripoll
bdf8d9d037
Initial version of semaphores both for POSIX and Windows. Includes test that detects failure of unnamed semaphores under Darwin. The whole code is still inactive.
2009-09-23 23:52:47 +02:00
Juan Jose Garcia Ripoll
cc052cb792
Added two new functions mp:lock-mine-p and mp:lock-count-mine which are used to implement mp:with-lock
2009-09-23 22:25:57 +02:00
Juan Jose Garcia Ripoll
78e9859bd2
Code to implement mp:interrupt-process in Windows:
...
* unixint.d: capture exceptions caused by page guards.
* unixint.d: to interrupt a Windows thread, set up a page guard onto the
ECL environment and in addition queue an APC call that accesses the
environment to trigger that exception.
* stacks.h: CL_CATCH_ALL uses _try/_except to enforce ECL's exception
handler. Without it, Windows behaves randomly and sometimes uses the
default handler and sometimes it simply aborts.
* threads.d: we use ordinary handlers to identify threads.
* time.d: SLEEP now uses Windows' SleepEx, leaving the thread in an
alertable state -- that is, it can be interrupted.
* top.lsp: fixed and improved the code that handles console interrupts,
by first using ordinary conditions and then using an interactive
query function to decide which process to interrupt.
2009-09-22 20:13:23 +02:00
Juan Jose Garcia Ripoll
161926ac93
Solved some problem with the queueing of signals and added preliminary code for MP:INTERRUPT-PROCESS using Windows page guards.
2009-09-20 21:53:02 +02:00
Juan Jose Garcia Ripoll
2661b663ae
New interrupt handling model:
...
* threads.d: New code to suspend and resume processes.
* threads.d: Threads are created detached with more robust code to wait
for completion.
* top.lsp: New code for handling console interrupt (Ctrl-C) allows
selectively interrupting one or more processes or continuing.
* file.d: Console streams are created in non-locking mode when needed.
* load.lsp.in: mp.lsp is always loaded.
* mp.lsp, symbols_list*: without-interrupts and the like belong in EXT
not in MP package.
2009-09-18 23:02:56 +02:00
Juan Jose Garcia Ripoll
b1ccedea3b
Implement ecl_clear_interrupts[_env]() as described in the manual.
2009-09-16 22:30:40 +02:00
Juan Jose Garcia Ripoll
e647d62b33
unixint.d:
...
* The code that decides whether to process or queue a signal is factored into
handle_or_queue. This code is now used by both Linux and Windows handlers.
* Each Linux or Windows handler translates the signal into a lisp object that
is passed to handle_or_queue. This allows for simpler, platform independent
queueing, and in particular it enables Windows to discriminate FPE errors.
2009-09-15 23:45:51 +02:00
Juan Jose Garcia Ripoll
74c8ce560c
The console is now protected by a global lock, so that toplevels from different threads do not interfere each other.
2009-09-13 19:25:44 +02:00
Juan Jose Garcia Ripoll
710bfbac2e
stacks.h: fixed typo in the definition of CL_CATCH_END
2009-09-13 19:25:43 +02:00
Juan Jose Garcia Ripoll
a9548b4510
config.h.in: autoconf screws an explicit #undef ECL_SIGNED_ZERO that is intended to be used as such.
2009-09-09 09:33:48 +02:00
Juan Jose Garcia Ripoll
bb15e28d00
Create threads in a joinable state (Unix pthread) and let it detach itself before exiting.
2009-09-08 15:32:30 +02:00
Juan Jose Garcia Ripoll
ffbb1b45ad
New function MP:PROCESS-JOIN, waits for a thread to terminate (J.C.Beaudoin)
2009-09-08 14:32:49 +02:00
Juan Jose Garcia Ripoll
a35ba14206
Create ecl_set_finalizer_unprotected() for situations in which a finalizer must be set with interrupts disallowed.
2009-09-05 10:41:59 +02:00
Juan Jose Garcia Ripoll
ca6198d753
Reimplement with-lock so that it is interrupt-safe.
2009-09-04 23:12:36 +02:00
Juan Jose Garcia Ripoll
4a3349a9f2
Implemented weak pointers.
2009-09-03 16:54:25 +02:00
Juan Jose Garcia Ripoll
d65e2aa8e7
When we do not have neither signbit nor copysign, we fall back to _not_ supporting signed zeros.
2009-08-31 21:18:43 +02:00
Juan Jose Garcia Ripoll
4bcd908a0a
The function ecl_alloc_simple_vector() is responsible now for allocation of simple strings and it uses ecl_alloc_compact_object().
2009-08-29 18:53:28 +02:00
Juan Jose Garcia Ripoll
d8cd52fefa
The routines for allocating bignums in a compact way is exported to alloc_2.d so that it can be applied to other objects.
2009-08-29 15:40:40 +02:00
Juan Jose Garcia Ripoll
9e6343bfe9
The flag ECL_NO_LEGACY had the opposite effect.
2009-08-29 10:44:07 +02:00
Juan Jose Garcia Ripoll
484fb955ab
Renamed all remaining internal functions that work with bignums.
2009-08-28 22:31:39 +02:00
Juan Jose Garcia Ripoll
132531d86a
New internal functions/macros _ecl_big_set_{fixnum,index}, _ecl_big_gcd, and removed all uses of bignum1.
2009-08-28 22:04:28 +02:00
Juan Jose Garcia Ripoll
44443c10b8
Prefixed the big_register* functions with _ecl_
2009-08-28 20:06:40 +02:00
Juan Jose Garcia Ripoll
1fb5504aaa
big_register{0,1,2}_get can now be inlined macros
2009-08-28 19:27:55 +02:00
Juan Jose Garcia Ripoll
3d778f4974
Bignum registers can not use statically allocated memory if we use GMP's own allocation/deallocation routines. This implies additional cleanup when deallocating an environment, and allowing for larger registers to decrease the pressure on the garbage collector.
2009-08-28 13:05:36 +02:00
Juan Jose Garcia Ripoll
3919ccdadc
Changed the routines that manipulate bignums so that they use bignum registers and free them when finished -- this should allow ECL work without changing GMP's memory functions.
2009-08-28 02:03:30 +02:00
Juan Jose Garcia Ripoll
be8da6e883
si_{get,set}_finalizer were not exported by the windows version of ECL.
2009-08-14 11:14:59 +02:00
Samium Gromoff
fe55f81cbe
Fix ecl_to_{u,}short.
2009-08-06 15:30:42 +02:00
Samium Gromoff
14d197733b
FILE-STREAM-FD.
2009-08-06 15:30:41 +02:00
Juan Jose Garcia Ripoll
54c3c99f3a
ecl_namestring() takes now a second argument which is a flag and includes the possibility of enforcing that the output be a base string. This is used by chdir, which formerly failed to work because of getting an extended string from namestring.
2009-08-03 21:14:40 +02:00
Juan Jose Garcia Ripoll
c159bc82c6
In order to define HAVE_LIBFFI we need both the library and the header
2009-08-02 22:27:22 +02:00
Juan Jose Garcia Ripoll
7195468eec
Completed the implementation of SI:SAFE-EVAL and SI:STRING-TO-OBJECT
2009-07-31 23:16:03 +02:00
Juan Jose Garcia Ripoll
a44854e182
Two new functions, ecl_read_from_cstring{,_safe}, do what c_string_to_object did before.
2009-07-31 22:51:03 +02:00
Juan Jose Garcia Ripoll
7dbe45ada9
First implementation of DFFI using libffi
2009-07-28 23:33:45 +02:00
Juan Jose Garcia Ripoll
5af9a2e99b
Implemented a function to change the encoding of a file stream
2009-07-26 12:59:15 +02:00
Juan Jose Garcia Ripoll
e6a872e731
Removed two unused fields, isform and mflag, from ecl_symbol. HEADER3 and HEADER4
2009-07-26 12:07:41 +02:00
Juan Jose Garcia Ripoll
da641873e4
In structures ecl_{array,vector,base_string,string}, replaced the bitfields hasfillp and adjustable with a single integer holding all flags. This solves several problems with Microsoft C compiler.
2009-07-26 11:56:26 +02:00
Juan Jose Garcia Ripoll
ba0d9f826e
Force the same header in arrays and vectors, because MSVC does not produce the right values for bit fields.
2009-07-21 22:20:25 +02:00
Juan Jose Garcia Ripoll
2ca580b13c
New routines to convert lisp objects to 'int', 'long' and 'bool'.
2009-07-15 15:19:08 +02:00
Juan Jose Garcia Ripoll
bae4afc9c3
Teach ECL to detect the size of 'int' and 'long'
2009-07-15 15:18:34 +02:00
Juan Jose Garcia Ripoll
eb4b073e8b
CIS, ASIN, ACOS, ASINH, ACOSH and ATANH now use the calling convention for functions with a fixed number of arguments
2009-07-12 23:47:24 +02:00
Juan Jose Garcia Ripoll
39d9ee467d
Implemented C function for inlining ARRAY-DIMENSION
2009-07-04 19:54:23 +02:00
Juan Jose Garcia Ripoll
509166541b
New error functions that will be used in compiled code
2009-07-04 17:17:23 +02:00
Juan Jose Garcia Ripoll
2dc460e7a5
Implement new error functions for array and vector types.
2009-07-03 09:35:06 +02:00
Juan Jose Garcia Ripoll
95fc3c6413
Create really unchecked versions of aref/aset
2009-07-03 00:25:38 +02:00
Juan Jose Garcia Ripoll
866d8c8604
The array element type is stored in the arrays, vectors and strings, thus simplifying identification and code. Slight speedup in ecl_aref.
2009-07-02 23:48:20 +02:00
Juan Jose Garcia Ripoll
1531a8b36e
Move the definition of _XOPEN_SOURCE out of ecl.h so that we can use MAP_ANON.
2009-07-02 17:55:56 +02:00
Juan Jose Garcia Ripoll
2501807b2d
Remove unused macro definitions.
2009-07-02 10:31:29 +02:00
Juan Jose Garcia Ripoll
1b98007713
ECL no longer uses non portable pthreads attributes (*_NP), moving to the standard names also in Linux. Threads are created in a detached state to avoid leaking resources (M. Mondor). Thread and mutex attributes are created only once (M. Mondor).
2009-07-02 10:29:20 +02:00
Juan Jose Garcia Ripoll
0bf0cfbbae
Factor out the guts of PROGV into a function ecl_progv() shared by the interpreter and the compiler.
2009-06-19 14:49:29 +02:00
Juan Jose Garcia Ripoll
0e89f235c4
Implement read-only readtables to avoid copying the standard readtable when this value is requested.
2009-06-19 11:12:49 +02:00