conditions: add an ext:timeout serious condition
This commit is contained in:
parent
e7355ac1fc
commit
0ab85fc9d5
5 changed files with 17 additions and 2 deletions
|
|
@ -386,6 +386,12 @@ FEprint_not_readable(cl_object x)
|
|||
cl_error(3, @'print-not-readable', @':object', x);
|
||||
}
|
||||
|
||||
void
|
||||
FEtimeout()
|
||||
{
|
||||
cl_error(1, @'ext::timeout');
|
||||
}
|
||||
|
||||
/*************
|
||||
* Shortcuts *
|
||||
*************/
|
||||
|
|
|
|||
|
|
@ -1562,7 +1562,7 @@ cl_symbols[] = {
|
|||
{SYS_ "ROOM-REPORT", SI_ORDINARY, si_room_report, -1, OBJNULL},
|
||||
{SYS_ "RESET-GC-COUNT", SI_ORDINARY, si_reset_gc_count, -1, OBJNULL},
|
||||
#endif /* !GBC_BOEHM */
|
||||
|
||||
{EXT_ "TIMEOUT", EXT_ORDINARY, NULL, -1, OBJNULL},
|
||||
/* #ifdef ECL_THREADS */
|
||||
{MP_ "PROCESS", MP_ORDINARY, NULL, -1, OBJNULL},
|
||||
{MP_ "LOCK", MP_ORDINARY, NULL, -1, OBJNULL},
|
||||
|
|
|
|||
|
|
@ -1562,7 +1562,7 @@ cl_symbols[] = {
|
|||
{SYS_ "ROOM-REPORT","si_room_report",-1},
|
||||
{SYS_ "RESET-GC-COUNT","si_reset_gc_count",-1},
|
||||
#endif /* !GBC_BOEHM */
|
||||
|
||||
{EXT_ "TIMEOUT",NULL,-1},
|
||||
/* #ifdef ECL_THREADS */
|
||||
{MP_ "PROCESS",NULL,-1},
|
||||
{MP_ "LOCK",NULL,-1},
|
||||
|
|
|
|||
|
|
@ -541,6 +541,14 @@ memory limits before executing the program again."))
|
|||
()
|
||||
(:REPORT "Illegal instruction."))
|
||||
|
||||
(define-condition ext:timeout (serious-condition)
|
||||
((value :initarg :value :initform nil))
|
||||
(:report (lambda (condition stream)
|
||||
(format stream "Timeout occurred~@[ after ~A second~:P~]."
|
||||
(slot-value condition 'value))))
|
||||
(:documentation
|
||||
"Signaled when an operation does not complete within an allotted time budget."))
|
||||
|
||||
(define-condition ext:unix-signal-received ()
|
||||
((code :type fixnum
|
||||
:initform 0
|
||||
|
|
|
|||
|
|
@ -594,6 +594,7 @@ extern ECL_API void FEundefined_function(cl_object fname) ecl_attr_noreturn;
|
|||
extern ECL_API void FEinvalid_function(cl_object obj) ecl_attr_noreturn;
|
||||
extern ECL_API void FEinvalid_function_name(cl_object obj) ecl_attr_noreturn;
|
||||
extern ECL_API void FEprint_not_readable(cl_object obj) ecl_attr_noreturn;
|
||||
extern ECL_API void FEtimeout() ecl_attr_noreturn;
|
||||
extern ECL_API cl_object CEerror(cl_object c, const char *err_str, int narg, ...);
|
||||
extern ECL_API void FElibc_error(const char *msg, int narg, ...) ecl_attr_noreturn;
|
||||
#if defined(ECL_MS_WINDOWS_HOST) || defined(cygwin)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue