Commit graph

22 commits

Author SHA1 Message Date
16fe285ec7 (lwpCreate) [UCONTEXT]: ss_sp is the (base) address of the stack area,
not the initial stack pointer.  Fix.  ss_size was wrong as well.
Amazing that this ever worked.
2005-12-07 20:39:55 +00:00
28e116dac4 (lwpCreate): Check STKALIGN is sane.
(lwpCreate): Used to allocate one byte more than necessary.  The fix
won't save memory (malloc() will add the byte back), it's just clearer
this way.

(lwpCreate): Clean up computation of sp.  Rename parameter size to
stacksz.

(lwpCreate): Always compute newp->lowmark and newp->highmark from sp,
not from s.  Old code misaligned newp->himark for stacks growing
upward when stack size argument wasn't aligned.
2005-12-07 20:28:12 +00:00
3bc2c1ae08 (stkalign_t, STKALIGN): Replace. 2005-12-07 19:47:26 +00:00
f958d3d683 (lwpReschedule): Fix the previous revision. 2005-12-06 00:12:34 +00:00
a76c6d3a4a [BOUNDS_CHECK]: Defunct, remove.
(lwpReschedule): Fix potential crash bug that crept in with
BOUNDS_CHECK years ago.
2005-12-05 22:58:23 +00:00
3a18d0b986 (lwpSave, lwpReschedule) [hpc]: Move machine-dependent code to arch.c,
where it belongs.  Code looks fishy.  Untested.
(initcontext, startpoint): Internal linkage.
2005-12-05 21:38:03 +00:00
5d79a0cf6e (lwpCreate): Clean up the incomprehensible #ifdef jungle. No
functional changes.
2005-12-05 19:16:59 +00:00
a2ae5ebe5e [NOSTRDUP]: Drop support for systems without strdup(). First commit
was incomplete.
2005-10-23 08:37:38 +00:00
380b063f9c Remove some redundant parenthesis; no functional change. 2005-07-23 19:48:35 +00:00
4f59fc9967 Remove a bunch of redundant casts. 2005-06-12 06:31:48 +00:00
75deff7811 (lwpInitSystem): Stack checking doesn't work and is not necessary for
main thread; clear LWP_STACKCHECK.
(lwpStackCheck): Log stack overflow/underflow and abort.
2005-03-16 18:06:03 +00:00
09b481b30a [!POSIXSIGNALS]: Thoroughly obsolete, remove. This also gets rid of
an odd case where signals were not catched when debugging.

(main, empth_start): Using sa_handler with SA_SIGINFO is wrong.
Simply don't set SA_SIGINFO; the additional signal information is not
used anyway.
2005-03-12 12:20:50 +00:00
e5919ac353 (lwpStackCheckUsed): Fix confusing output. 2004-03-17 07:12:31 +00:00
be626bacb1 (lwpCreate): Avoid harmless compiler warning. 2004-03-09 13:28:16 +00:00
510a57f4ea The fix in the previous rev. wasn't complete. 2004-03-09 13:20:39 +00:00
e7d75b2279 Use gcc function attribute `format' to catch bad format strings. Fix
them.  From Marc Olzheim.
Type modifier 'l' was missing in many places, probably rendering the
server useless on 64-bit hosts.
(ef_flush, ef_write, ef_extend, lwpCreate, lwpDestroy): Use conversion
specifier 'p' to print pointers.
(check_market): Fix display of loan amount.
(doland): Fix unescaped '%' (undefined behavior).
(ldump, ndump, pdump, sdump): Don't use flag '0' with conversion
specifier 's' (undefined behavior).
(dump, ldump, lost, ndump, pdump, sdump, empth_create, update_sched):
Cast time_t and pthread_t to long for printing.
(lwpStackCheck, lwpStackCheckUsed, finish_sects): Insert cast to fix
argument type on all platforms.
(prod): Remove extra argument.
(perform_mission, airdamage, retreat_land1, lwpReschedule): Format
string missed arguments.
2004-03-09 12:27:40 +00:00
e67dca9d29 Indentation fixes; suspect indent-emp is to blame. 2004-02-28 18:06:11 +00:00
4a3f0b8146 Add some missing declarations to headers. Remove some redundant
declarations elsewhere.  Change linkage of some functions to static.
2004-02-20 10:51:03 +00:00
80aae5b8e6 Remove some superflous declarations missed in the previous revision. 2004-02-17 22:29:59 +00:00
237baffca9 Supply prototypes where possible. This uncovered type errors with
thread entrypoints:
(lwpSelect, shutdown_sequence): Parameters didn't match thread entry
point prototype.
(lwpEntryPoint): Arguments didn't match thread entry point prototype.

Change linkage of functions without prototype declaration to static
where possible.

Remove some superflous declarations, replace others by suitable
includes.
2004-02-17 17:59:30 +00:00
9b7adfbecc Indented with src/scripts/indent-emp. 2003-09-02 20:48:48 +00:00
d8b7fdfae1 Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00