]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/kernel/v2_0/ChangeLog
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / kernel / v2_0 / ChangeLog
1 2007-08-23  Hans Rosenfeld  <rosenfeld@grumpf.hope-2000.org>
2
3         * tests/intr0.cxx, tests/kintr0.c: As suggested by Bart Veer,
4         priorities of the interrupts created by intr0 and kintr0 can now
5         be overridden by the HAL through HAL_INTR_TEST_PRIO_x constants.
6
7 2007-07-02  Gary Thomas  <gary@mlbassoc.com>
8
9         * src/debug/dbg_gdb.cxx: 
10         * src/common/thread.cxx (Cyg_IdleThread): Add (char *) casts
11         to make GCC/4.2.x happy.
12
13 2007-06-11  Nick Garnett  <nickg@ecoscentric.com>
14
15         * tests/klock.c (entry0, entry1): Modify mbox part of test to
16         reflect use of plain mbox implementation. The precise ordering of
17         events is slightly different.
18
19 2007-01-07  Andrew Lunn  <andrew.lunn@ascom.ch>
20
21         * src/sync/mbox.cxx (Cyg_Mbox::get): Fix compiler warning with gcc
22         version 4.1.2.
23
24 2006-12-08  Nick Garnett  <nickg@ecoscentric.com>
25         
26         * src/sched/mlqueue.cxx (add_thread, yield): 
27         * src/sched/sched.cxx (unlock_inner, thread_entry): 
28         * include/mlqueue.hxx (class Cyg_SchedThread_Implementation):
29         * include/kapidata.h (CYG_SCHEDTHREAD_TIMESLICE_MEMBER): 
30         * include/bitmap.hxx (class Cyg_SchedThread_Implementation):
31         Reimplement timeslicing code. There is now a timeslice_count field
32         in each thread which is moved to and from the per-CPU counter
33         during thread dispatch. This approach has been taken to minimize
34         the changes needed to SMP code. Scheduler specific thread
35         functions handle counter save, restore and reset. These functions
36         are defined (as empty inlines) even when timeslicing is disabled,
37         or in non-timeslicing schedulers, to avoid adding ifdefs to the
38         code (this change actually removes some).
39
40         * tests/timeslice2.c: 
41         * cdl/kernel.cdl: Added timeslice2 test to test behaviour of
42         timeslicing while being preempted.
43
44 2006-10-12  Nick Garnett  <nickg@ecoscentric.com>
45
46         * cdl/synch.cdl: Added CYGIMP_MBOX_USE_MBOXT_PLAIN option. This is
47         tested in various places but was not actually defined. It now is
48         and defaults to 1 so that the plain version of mail boxes is
49         selected.
50
51         * include/mboxt.inl: 
52         * include/mboxt2.inl: Moved various CYG_ASSERTCLASS() calls to be
53         within scheduler locked regions. Race conditions could have caused
54         them to fail before.
55
56         * tests/mbox1.cxx:
57         * tests/kmbox1.cxx: Updated tests to work with mboxt
58         implementation. This requires thread 1 to run at lower priority
59         than thread 0.
60
61 2006-08-21  Jonathan Larmour  <jifl@eCosCentric.com>
62
63         * doc/kernel.sgml: Use reinterpret_cast, not static cast
64         Thanks to Tony Garland for the report in bug 1000299.
65
66 2006-05-19  Andrew Lunn  <andrew.lunn@ascom.ch>
67
68         * host/instr/dump_instr.c: Use CYG_NELEM from infra.
69         * src/instrmnt/meminst.cxx: Use CYG_NELEM from infra.
70
71 2006-05-09  Andrew Lunn  <andrew.lunn@ascom.ch>
72
73         * tests/stress_threads.c: Add string.h to avoid compiler warning.
74
75 2006-04-11  Sergei Organov <osv@javad.com>
76
77         * doc/kernel.sgml: Fix typo
78
79 2006-04-10  Sergei Organov  <osv@javad.com>
80
81         Implement FIFO variant of scheduling of DSRs and make it the
82         default. This is reworked patch originally suggested by Stefan
83         Sommerfeld <sommerfeld@mikrom.com>.
84
85         * cdl/interrupts.cdl (CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST): make it
86         cdl_component.
87         * cdl/interrupts.cdl (CYGSEM_KERNEL_INTERRUPTS_DSRS_LIST_FIFO):
88         new option for CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST.
89         * include/intr.hxx (class Cyg_Interrupt): new static variable
90         dsr_list_tail.
91         * src/intr/intr.cxx (call_pending_DSRs_inner): add
92         CYGSEM_KERNEL_INTERRUPTS_DSRS_LIST_FIFO variant.
93         (post_dsr): likewise.
94         * tests/intr0.cxx: fix comments to match actual option names.
95         * tests/kintr0.c: likewise.
96         
97 2006-03-27  Marco Cruz  <marco@daruma.com.br>
98
99         * include/thread.hxx: removed extra qualifier of
100         Cyg_Thread::reinitialize() to permit compile on gcc 4.1.0
101         * include/sched.hxx: removed extra qualifier of
102         Cyg_Scheduler::thread_entry to permit compile on gcc 4.1.0
103
104 2006-02-14  Andrew Lunn  <andrew.lunn@ascom.ch>
105
106         * tests/timeslice.c  (STACK_SIZE): Reduce the stack size so it will
107         compile on targets wit h only small amounts of RAM.
108         * tests/fptest.c: Calculate the size of ftp2_values array to fit
109         the amount of RAM in small systems.
110         * tests/clocktruth.cxx: Fix the header.
111         
112 2006-01-19  Nick Garnett  <nickg@ecoscentric.com>
113
114         * src/sched/sched.cxx (thread_entry): Fixed a bug which could
115         cause a thread to be started with a non-zero scheduler lock. The
116         previous code only decremented it by 1 so if the previous thread
117         was executing with the lock > 1 the thread ended up with a
118         non-zero lock. This is fixed by decrementing the lock in a loop
119         until it reaches zero.
120
121         * src/common/thread.cxx (idle_thread_main): Added an assert for a
122         non-zero scheduler lock.
123
124 2006-01-10  Nick Garnett  <nickg@ecoscentric.com>
125
126         * src/sched/sched.cxx: 
127         * include/sched.hxx (class Cyg_Scheduler): Added thread_entry()
128         member function. This handles thread startup housekeeping. Zeroing
129         the scheduler lock is handled by calling unlock() so that DSRs may
130         be run.
131
132         * src/common/thread.cxx (thread_entry): Refactored code to call
133         Cyg_Scheduler::thread_entry() instead of doing all the work here.       
134
135 2005-11-23  Sergei Organov  <osv@javad.com>
136
137         * doc/kernel.sgml: Fix description of CYG_ISR_CALL_DSR and
138         CYG_ISR_HANDLED. Fix example isr_function() accordingly.
139
140 2005-10-23  Andrew Lunn  <andrew.lunn@ascom.ch>
141
142         * include/flag.hxx: We need thread.inl for the empty() function
143         implementation which the compiler wants to inline.
144         
145 2005-08-03  Andrew Lunn  <andrew.lunn@ascom.ch>
146
147         * tests/ksem1.c: Type fix to fix a compiler warning.
148         * tests/mutex3.cxx: new cannot be both static and global.
149         * tests/testaux.hxx: Ditto
150
151 2005-07-30  Andrew Lunn  <andrew.lunn@ascom.ch>
152
153         * src/sync/mbox.cxx (tryget,peak_item): initialize local variable
154         to avoid compiler warning.
155         
156 2005-06-21  Peter Korsgaard  <jacmet@sunsite.dk>
157
158         * tests/kcache2.c (test_dcache_operation): Fixed compiler warnings
159         about formats strings for diag_printf.
160
161 2005-03-27  Andrew Lunn  <andrew.lunn@ascom.ch>
162
163         * tests/tm_basic.cxx (_run_all_tests): Fixed compiler warning.
164
165 2004-12-15  Sergei Organov <osv@topconrd.ru>
166
167         * cdl/scheduler.cdl: Correct the description of
168         CYGIMP_KERNEL_SCHED_SORTED_QUEUES
169         
170 2004-09-24  Nick Garnett  <nickg@ecoscentric.com>
171
172         * src/sched/mlqueue.cxx (enqueue): Fix bug in sorted queue
173         insertion: priority test was inverted. Spotted by TomChen.
174
175 2004-08-08  Bart Veer  <bartv@ecoscentric.com>
176
177         * cdl/counters.cdl: add new option for the clock interrupt
178         priority.
179
180         * src/common/clock.cxx (Cyg_RealTimeClock): use this option.
181
182 2004-04-15  Jonathan Larmour  <jifl@eCosCentric.com>
183
184         * tests/fptest.c (do_test): Silence aliasing warning when breaking
185         doubles into two ints.
186
187 2004-04-11  Andrew Lunn  <andrew.lunn@ascom.ch>
188
189         * doc/kernel.sgml: Expanded the documentation about the use of
190         CYG_FLAG_WAITMODE_CLR.
191
192 2004-03-27  Sebastien Couret    <sebastien.couret@elios-informatique.fr>
193
194         * src/debug/dbg-thread-demux.c (dbg_thread_syscall_rmt): Only
195         needed if CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT is enabled.
196
197 2004-03-12  Jonathan Larmour  <jifl@eCosCentric.com>
198
199         * include/kapi.h: Add throw specifications throughout.
200         * src/kapi.cxx: Ditto.
201         * include/sched.inl: Move include of thread.inl further down to
202         allow Cyg_Scheduler inlines to be defined first.
203         * include/thread.inl: Reorder destructors section and include
204         sched.inl right before it to solve mutual header dependency
205         problems.
206
207 2004-03-04  Jonathan Larmour  <jifl@eCosCentric.com>
208
209         * doc/kernel.sgml: Document cyg_thread_delete return value.
210
211 2004-02-19  Jonathan Larmour  <jifl@eCosCentric.com>
212
213         * tests/kmutex3.c (cyg_start): Use CYG_TEST_NA.
214         * tests/kmutex4.c (cyg_start): Ditto.
215         * tests/mutex2.cxx (cyg_start): Ditto.
216         * tests/mutex3.cxx (cyg_start): Ditto.
217         * tests/sync3.cxx (cyg_start): Ditto.
218         * tests/thread2.cxx (cyg_start): Ditto.
219
220         * tests/fptest.c (cyg_start): Use one line NA msg.
221         * tests/smp.cxx (cyg_start): Ditto.
222         * tests/timeslice.c (cyg_start): Ditto.
223         * tests/tm_basic.cxx (cyg_start): Ditto.
224
225 2003-12-08  Dan Jakubiec  <djakubiec@yahoo.com>
226
227         * src/common/kapi.cxx: Added new function cyg_thread_get_id().
228         This function returns the unique thread ID for a given thread
229         handle.
230
231         * include/kapi.h: Added function prototype for cyg_thread_get_id().
232
233         * doc/kernel.sgml: Added documentation for cyg_thread_get_id().
234
235 2003-10-13  Nick Garnett  <nickg@balti.calivar.com>
236
237         * src/common/clock.cxx (Cyg_Counter::tick): Changed code to deal
238         with manipulation of unsorted lists (see ChangeLogs passim). There
239         are several corner cases where the current code does not
240         work. Replaced with a more straightforward, but slightly more
241         expensive, implementation.
242
243 2003-09-22  Reinhard Jessich  <Reinhard.Jessich@frequentis.com>
244
245         * src/common/clock.cxx: Removed label/goto
246         add_alarm_unlock_return to get rid of compiler error when
247         CYGIMP_KERNEL_COUNTERS_SORT_LIST is enabled.
248
249 2003-09-01  Bart Veer  <bartv@ecoscentric.com>
250
251         * doc/kernel.sgml: fix typo, cyg_thread vs. cyg_thread_t
252
253 2003-07-18  Nick Garnett  <nickg@balti.calivar.com>
254
255         * cdl/counters.cdl: Removed the counters override CDL
256         options. These are no longer very useful, since too much
257         non-kernel code now uses the HAL options to get these values.
258
259 2003-07-10  Nick Garnett  <nickg@balti.calivar.com>
260
261         * src/common/clock.cxx (Cyg_Counter::tick): In unsorted list case:
262         moved saving of next node details to before re-insertion of alarms
263         with intervals. The call to add_alarm() can make enough of a
264         difference to the list to need to force a rescan.
265
266 2003-07-06  Bart Veer  <bartv@ecoscentric.com>
267
268         * include/test/stackmon.h (cyg_test_size_a_stack):
269         If stack checking is enabled, look for 0xdeadbeef rather than 0x0
270         to determine usage. Also reset the interrupt stack to that value.
271
272 2003-07-02  Jonathan Larmour  <jifl@eCosCentric.com>
273
274         * doc/kernel.sgml: Document that timeouts for timed functions are
275         absolute, not relative. Also document new semantics for
276         cyg_semaphore_timed_wait() for timeouts in the past.
277
278 2003-07-01  Nick Garnett  <nickg@balti.calivar.com>
279
280         * include/clock.hxx: Made Cyg_Counter::add_alarm() and
281         Cyg_Counter::rem_alarm() private functions. They no longer lock
282         the scheduler, so should not be called directly, only via the
283         Cyg_Alarm functions.
284
285         * include/clock.inl: Removed inline version of
286         Cyg_Alarm::disable(). It's no longer a one-liner and is thus
287         better as a proper function.
288
289         * src/common/clock.cxx (Cyg_Counter::tick): Rewrote the unsorted
290         list option. If the function of one alarm adds or removes other
291         alarms, then is was possible for the list to become corrupted. The
292         new implementation attempts to avoid this problem.
293         (Cyg_Alarm::initialize): Added scheduler locking to protect the
294         enabled flag.
295         (Cyg_Alarm::enable): Ditto.
296         (Cyg_Alarm::disable): Ditto. Moved here from clock.inl.
297         (Cyg_Alarm::add_alarm): Removed scheduler locking, it is now
298         always called from functions that have already locked it. Added an
299         assertion to double-check this.
300         (Cyg_Alarm::rem_alarm): Ditto.
301
302         * cdl/kernel.cdl:
303         * tests/kalarm0.c:
304         Added new test to test that alarms can be added and removed in
305         alarm functions safely.
306         
307 2003-06-25  Thomas Binder  <Thomas.Binder@frequentis.com>
308
309         * src/common/clock.cxx (Cyg_Counter::rem_alarm): Bugfix: call
310         Cyg_Scheduler::lock() before calculation of index into alarm_list
311         array to avoid race condition with multi list counters.
312
313 2003-06-06  David Brennan  <eCos@brennanhome.com>
314 2003-06-23  Nick Garnett  <nickg@balti.calivar.com>
315
316         * cdl/kernel.cdl: Added tests/bin_sem3 to list of kernel tests.
317
318         * include/sema.hxx: Added declaration for wait with timeout for
319         Cyg_Binary_Semaphore.
320         
321         * include/instrmnt.h: Added instrumentation point for binary semaphore
322         timeout.
323         
324         * src/sync/bin_sem.cxx: Added wait with time-out function to 
325         Cyg_Binary_Semaphore class. 
326
327         * src/sync/cnt_sem.cxx: Modified semantics slightly to claim an
328         available semaphore even with a timeout in the past. This is in
329         line with the new timed wait in bin_sem.cxx. 
330
331         * tests/bin_sem3.cxx: Created new test for timed wait binary
332         semaphore.
333                 
334 2003-05-20  Andrew Lunn  <andrew.lunn@ascom.ch>
335
336         * src/common/kapi.cxx (cyg_thread_get_next): Passing a *current
337         pointer as NULL if how you start the walk of the linked list. So
338         don't assert on NULL. Reported by Daniel Lidsten.
339
340 2003-05-05  Gary Thomas  <gary@mlbassoc.com>
341
342         * tests/tm_basic.cxx: Support new option controlling number of times
343         this test runs.  This is useful for long-term stress and performance
344         analysis.
345
346 2003-05-03  Jonathan Larmour  <jifl@eCosCentric.com>
347
348         * include/mqueue.inl (Cyg_Mqueue::get): Fix invalid loop termination
349         cheque for whether busy or not.
350         (Cyg_Mqueue::put): Ditto.
351
352 2003-03-03  Jonathan Larmour  <jifl@eCosCentric.com>
353
354         * tests/fptest.c: Make all variables static to avoid any risk
355         of collisions with symbols defined elsewhere in eCos.
356
357 2003-02-27  Jonathan Larmour  <jifl@eCosCentric.com>
358
359         * include/kapidata.h: Revert change of 2001-08-23 and instead make
360         it conditional on the GCC version. Also add comments explaining why
361         this file has been apparently obfuscated.
362
363 2003-02-25  Nick Garnett  <nickg@calivar.com>
364
365         * tests/fptest.c (alarm_fn): Added CYG_TEST_PASS() call to keep
366         configtool happy.
367
368 2003-02-24  Jonathan Larmour  <jifl@eCosCentric.com>
369
370         * cdl/kernel.cdl: Update doc links.
371         * cdl/synch.cdl: Ditto.
372         * cdl/thread.cdl: Ditto.
373
374 2003-02-19  Nick Garnett  <nickg@calivar.com>
375
376         * tests/fptest.c: Changed to run for a constant time rather than a
377         constant number of iterations, with a shorter run time for
378         simulated targets.
379
380 2003-02-10  Gary Thomas  <gary@mlbassoc.com>
381
382         * include/thread.inl: Add more debug info to thread stack checking.
383
384         * tests/clocktruth.cxx: 
385         * tests/clockcnv.cxx: Use <cyg/infra/diag.h> for diag_printf()
386         prototype, rather than hard coding (because it was inconsistent).
387
388 2003-02-05  Gary Thomas  <gary@mlbassoc.com>
389
390         * tests/kcache2.c (test_dcache_operation): New test to verify
391         that the DATA cache syncs properly.
392
393 2003-01-31  Nick Garnett  <nickg@calivar.com>
394
395         * cdl/kernel.cdl: 
396         * tests/fptest.c: Added this program to test interaction of FPU
397         with multiple threads.
398
399 2003-01-30  Jonathan Larmour  <jifl@eCosCentric.com>
400
401         * src/common/thread.cxx: Fix potential warning and overflow with
402         CYGNUM_KERNEL_THREADS_DATA_MAX == 32.
403
404 2003-01-28  Jonathan Larmour  <jifl@eCosCentric.com>
405
406         * src/common/kapi.cxx (cyg_thread_get_next): Be quite zealous about
407         checking the validity of passed in threads in debug mode.
408         (cyg_thread_get_info): Ditto.
409
410         * cdl/thread.cdl: Correct max legal value for
411         CYGNUM_KERNEL_THREADS_DATA_MAX.
412
413 2003-01-22  Jonathan Larmour  <jifl@eCosCentric.com>
414
415         * doc/kernel.sgml: Document cyg_thread_info type.
416
417 2003-01-13  Dmitriy Korovkin  <dkorovkin@rambler.ru>
418 2003-01-13  Jonathan Larmour  <jifl@eCosCentric.com>
419
420         * include/mqueue.hxx: Allow get/put to return time out.
421         * include mqueue.inl: Ditto.
422
423 2003-01-02  Gary Thomas  <gary@mlbassoc.com>
424
425         * tests/kcache2.c: New subtest for raw data cache operations.
426
427 2002-12-12  Nick Garnett  <nickg@ecoscentric.com>
428
429         * src/common/kapi.cxx: 
430         * include/kapi.h:
431         Added function cyg_thread_get_next(), cyg_thread_find() and
432         cyg_thread_get_info() to allow the current set of threads to be
433         enumerated, and per-thread information to be retrieved safely.
434
435         * doc/kernel.sgml: Documented new KAPI calls.
436
437         * src/common/thread.cxx: Zero unique_id in thread destructor so
438         that a stale thread pointer can be checked for validity.
439
440         * include/instrmnt.h:
441         Added cyg_instrument_state() to report the current state of an
442         instrumentation flag.
443         Moved ifdef for CYGDBG_KERNEL_INSTRUMENT_MSGS out of within FLAGS
444         ifdef. We can have messages without flags.
445
446         * src/instrmnt/meminst.cxx: 
447         Added cyg_instrument_state() to report the current state of an
448         instrumentation flag.
449         Modified cyg_instrument_msg() in line with header and table
450         changes.
451
452         * host/instr/dump_instr.c:
453         * host/instr/instrument.sh:
454         * include/instrument_desc.h: 
455         Added a final NULL element to the generated table in
456         instrument_desc.h to mark its end. Otherwise code that does not
457         have access to the table definition cannot find its end. Also
458         added ifdefs to allow instrument_desc.h to be used to acquire the
459         structure definition and table pointer.
460
461 2002-12-03  Gary Thomas  <gthomas@ecoscentric.com>
462
463         * tests/tm_basic.cxx: Add tests of 'flag' synchronizers.
464
465 2002-10-28  Andrew Lunn  <andrew.lunn@ascom.ch>
466
467         * tests/tm_basic.cxx: Include infra/diag.h and removed the 
468         incorrect prototype for diag_printf
469
470 2002-10-16  Gary Thomas  <gthomas@ecoscentric.com>
471
472         * include/test/stackmon.h (STACKMON_PRINTF): Use #include to get
473         prototype for 'diag_printf()'.
474
475 2002-10-01  Jonathan Larmour  <jifl@eCosCentric.com>
476
477         * src/common/clock.cxx (add_alarm): Tweak last change to allow
478         alarm order for identical alarms to be the same as it used to be.
479
480 2002-09-30  Jonathan Larmour  <jifl@eCosCentric.com>
481
482         * src/common/clock.cxx (add_alarm): Fix bug resulting in alarms
483         not being added at all if a lower triggered alarm already exists.
484         Reported by Christoph Csebits.
485         Also fix bug when alarm is entered for the same time as tail.
486         These bugs only apply for CYGIMP_KERNEL_COUNTERS_SORT_LIST enabled.
487
488         * doc/kernel.sgml: document that order of callback for alarms at
489         identical times is unspecified.
490
491 2002-08-08  Nick Garnett  <nickg@calivar.demon.co.uk>
492
493         * src/sched/sched.cxx (unlock_inner): Removed initial
494         assertion. This has served its purpose and with the introduction
495         of routines such as unlock_reschedule() is prone to firing in
496         otherwise benign circumstances.
497
498 2002-08-05  Bart Veer  <bartv@tymora.demon.co.uk>
499
500         * cdl/kernel.cdl, include/kapidata.h, include/kapi.h:
501         Allow configurations with the kernel but no malloc
502
503 2002-06-05  Gary Thomas  <gary@chez-thomas.org>
504
505         * include/kapi.h: Fix prototype (to allow builds with net stack).
506
507 2002-05-24  Jesper Skov  <jskov@redhat.com>
508
509         * cdl/kernel.cdl: Fix typo.
510
511 2002-05-23  Jonathan Larmour  <jlarmour@redhat.com>
512
513         * include/kapi.h: Expose new cyg_thread_add_destructor and
514         cyg_thread_rem_destructor APIs.
515
516         * include/kapidata.h (struct Cyg_Destructor_Entry):
517         Change CYG_ADDRWORD to more correct cyg_addrword_t.
518
519         * include/thread.hxx (class Cyg_Thread): add_destructor and
520         rem_destructor are onyl static when not per-thread.
521
522         * include/thread.inl (add_destructor): Don't need to lock and unlock
523         scheduler when destructors are per-thread.
524         (rem_destructor): Ditto.
525
526         * src/common/thread.cxx (exit): No need to lock scheduler when
527         calling destructors.
528
529         * doc/kernel.sgml: Document thread destructor API.
530
531 2002-05-23  Nick Garnett  <nickg@redhat.com>
532
533         * doc/kernel.sgml: Some more edits to the kernel documentation:
534         changed all references to message boxes to mail boxes, clarified
535         some thing in various places, fixed a few typos.
536
537 2002-05-23  Jesper Skov  <jskov@redhat.com>
538
539         * cdl/kernel.cdl: Cleaned up kernel tests rule. Also remove tests
540         depending on the C API when its not present. And skip dhrystone
541         test when debug or instrumentation is enabled.
542
543         * tests/tm_basic.cxx: Fixed warning.
544
545 2002-05-22  Nick Garnett  <nickg@redhat.com>
546
547         * doc/kernel.sgml:
548         Fixed up SMP documentation.
549         Rewrote condtion variable documentation to make its relationship
550         to mutexes more apparent.
551
552 2002-05-22  Jesper Skov  <jskov@redhat.com>
553
554         * tests/smp.cxx: Move inclusion of testaux.hxx to below NA
555         checks.
556
557 2002-05-21  Bart Veer  <bartv@redhat.com>
558
559         * doc/kernel.sgml:
560         Major update to the kernel documentation.
561
562 2002-05-21  Jesper Skov  <jskov@redhat.com>
563
564         * src/common/clock.cxx (dsr): Fix latency ifdef guards.
565         * tests/tm_basic.cxx: Same.
566
567 2002-05-20  Jonathan Larmour  <jlarmour@redhat.com>
568
569         * src/sched/mlqueue.cxx: Don't force timeslice tracing on by default
570         against the user's wishes.
571         * cdl/scheduler.cdl: Instead provide an option controlling it.
572
573 2002-05-09  Jonathan Larmour  <jlarmour@redhat.com>
574
575         * include/kapidata.h (CYG_HARDWARETHREAD_MEMBERS): entry_point
576         should be a pointer to function not an addrword (which may be
577         different).
578         (cyg_reason_t): Define cyg_reason_t as an enum not an int.
579         (struct cyg_mutex_t): Define mutex protocol as an enum not a cyg_uint32.
580         Define locked member as a cyg_atomic, not a cyg_bool.
581
582 2002-05-09  Nick Garnett  <nickg@redhat.com>
583
584         * tests/timeslice.c: Modified test thread to accumulate run time
585         by reading HAL clock, and to detect and record changes of CPU. The
586         previous version of this code reported varying results - probably
587         as a consequence of cache effects.
588
589         * include/instrmnt.h: Fixed left-over debug edit to MLQ
590         instrumentation enable code.
591
592 2002-04-29  Jesper Skov  <jskov@redhat.com>
593
594         * include/kapi.h: Added cyg_alarm_get_times and
595         cyg_counter_multi_tick.
596         * src/common/kapi.cxx: Same. Er, fix oversight.
597         * doc/kernel.sgml: Doc update.
598
599 2002-04-24  Yoshinori Sato  <qzb04471@nifty.ne.jp>
600
601         * src/sync/flag.cxx: Don't set default args in func definitions.
602
603 2002-04-24  Jesper Skov  <jskov@redhat.com>
604
605         * tests/dhrystone.c: Moved platform max number of passes to CDL in
606         HALs.
607
608 2002-04-23  Jesper Skov  <jskov@redhat.com>
609
610         * tests/dhrystone.c: Allow platform to define max number of passes
611         via CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES.
612
613 2002-04-09  Jonathan Larmour  <jlarmour@redhat.com>
614
615         * include/kapi.h: Use NORET attributes from cyg_type.h.
616         * include/sched.hxx (class Cyg_Scheduler): Ditto.
617
618 2002-04-08  Nick Garnett  <nickg@redhat.com>
619
620         * src/sync/mutex.cxx: Added IF_PROTOCOL_ACTIVE macro to condition
621         use of the mutex counter. This means that a mutex that is not
622         configured to participate in a priority inversion protocol does not
623         count for operation of that protocol. 
624
625 2002-03-04  Lars Viklund <lars.viklund@axis.com>
626
627         * include/kapidata.h (CYG_SCHEDTHREAD_ASR_MEMBER): 
628         asr_inhibit is cyg_ucount32 - must match
629
630 2002-02-13  Hugo Tyson  <hmt@redhat.com>
631
632         * doc/kernel.sgml: NEW FILE: Correct reference to uITRON doc.
633
634 2002-01-28  Jesper Skov  <jskov@redhat.com>
635
636         * tests/kexcept1.c: Fix warning.
637
638 2002-01-24  Jesper Skov  <jskov@redhat.com>
639
640         * tests/kcache1.c (time0DI): Disable interrupts around the
641         sync+invalidate process.
642         * tests/kcache2.c: Same.
643
644 2002-01-23  Jonathan Larmour  <jlarmour@redhat.com>
645
646         * src/intr/intr.cxx (mask_interrupt): Disable interrupts.
647         (unmask_interrupt): Ditto.
648         (mask_interrupt_intunsafe): New function to avoid disabled interrupts.
649         (unmask_interrupt_intunsafe): Ditto.
650         * include/intr.hxx (class Cyg_Interrupt): Declare above new funcs.
651         * src/common/kapi.cxx (cyg_interrupt_unmask_intunsafe): Above
652         replicated to KAPI.
653         (cyg_interrupt_mask_intunsafe): Ditto.
654         * include/kapi.h: Ditto.
655
656 2002-01-07  Nick Garnett  <nickg@redhat.com>
657
658         * tests/except1.cxx: 
659         * tests/kexcept1.cxx:
660         Added ifdef to disable these tests in ARM PID platform. This
661         platform cannot generate any of the exceptions that this test
662         needs to work.
663
664 2001-12-12  Jesper Skov  <jskov@redhat.com>
665
666         * tests/kcache2.c (time_ilock): Put some dummy goto statements in
667         to prevent compiler from moving labels around.
668
669 2001-11-29  Jonathan Larmour  <jlarmour@redhat.com>
670
671         * src/sched/mlqueue.cxx (timeslice_cpu): Reset timeslice_count on
672         a timeslice.
673         Noticed by Tony Kho.
674
675 2001-11-23  Jonathan Larmour  <jlarmour@redhat.com>
676
677         * tests/klock.c (entry1): Support running with
678         CYGFUN_KERNEL_THREADS_TIMER disabled.
679
680 2001-10-30  Nick Garnett  <nickg@redhat.com>
681
682         * tests/kcache2.c (test_dsync):
683         Added call to HAL_ICACHE_INVALIDATE_ALL() just before DCACHE
684         disable. In platforms where both caches are controlled together,
685         such as the VR4300, not doing this can result in strange behaviour
686         as the ICACHE gets turned off under the program's feet, when it is
687         not ready for it.
688
689 2001-10-17  Jesper Skov  <jskov@redhat.com>
690
691         * tests/dhrystone.c: CYGINT_ISO_STRING_STRFUNCS check changed to
692         ifdef.
693
694 2001-10-12  Jonathan Larmour  <jlarmour@redhat.com>
695
696         * cdl/synch.cdl (CYGIMP_KERNEL_SYNCH_MQUEUE_NOT_INLINE): New option
697         to avoid inlining mqueue implementation.
698
699         * src/sync/mqueue.cxx: New file to provide non-inline version of
700         mqueue functions.
701
702         * include/mqueue.hxx: Don't include .inl if user doesn't want inlining.
703
704         * include/mqueue.inl: Allow choice of inlining or not to be
705         overridden by macro.
706
707         * tests/mqueue1.cxx: Never use inline version.
708
709 2001-10-11  Jesper Skov  <jskov@redhat.com>
710
711         * tests/kmutex3.c (new_thread): Fixed allocation: increase counter
712         before starting threads which have been allocated resources.
713         * tests/kmutex4.c (new_thread): Same.
714         * tests/mutex3.cxx (new_thread): Same.
715         * tests/testaux.hxx (new_thread): Same.
716
717         * tests/kcache2.c: Fixed warning.
718         * tests/stress_threads.c: Same.
719
720 2001-09-20  Jonathan Larmour  <jlarmour@redhat.com>
721
722         * host/instr/dump_instr.c (main): Fix argc check.
723
724 2001-09-07  Jonathan Larmour  <jlarmour@redhat.com>
725
726         * include/thread.inl (measure_stack_usage): Deal with stack limits.
727
728 2001-09-07  Nick Garnett  <nickg@redhat.com>
729
730         * src/common/thread.cxx (set_priority): Change argument to
731         instrumentation call to new_priority rather than current
732         priority. (Suggested by Andrew Lunn).
733
734 2001-09-05  Jesper Skov  <jskov@redhat.com>
735
736         * include/mqueue.inl (Cyg_Mqueue): Initialize busy flag of last
737         entry in the list.
738
739 2001-09-04  Jonathan Larmour  <jlarmour@redhat.com>
740
741         * cdl/instrument.cdl (CYGDBG_KERNEL_INSTRUMENT_BUILD_HOST_DUMP): 
742         Remove redundant requires, and adjust make rule to be more portable
743         across hosts.
744         (CYGDBG_KERNEL_INSTRUMENT_MSGS_BUILD_HEADERFILE):
745         Invoke script with sh directly rather than rely on executable attribute.
746
747         * host/instr/readme.txt: Update build of host dump as per the changed
748         CDL.
749
750         * cdl/kernel.cdl: Don't build nullinst.cxx any more.
751         Build meminst.cxx only in CYGPKG_KERNEL_INSTRUMENT.
752         * src/instrmnt/nullinst.cxx: Delete. It causes confusion in the
753         library as it declares cyg_instrument like meminst.cxx does.
754
755 2001-08-31  Nick Garnett  <nickg@redhat.com>
756
757         * src/intr/intr.cxx: Clean up typo in DSR table
758         case. dsr_table_tail and dsr_table_head were not being subscripted
759         in a couple of places.
760
761 2001-08-23  Hugo Tyson  <hmt@redhat.com>
762 2001-08-20  Andrew Lunn <andrew.lunn@ascom.ch>
763
764         * include/instrument_desc.h: New file.  This contains the table of
765         events used to print the nice information.  It should be
766         regenerated when the instrumentation numbers change.
767
768         * src/instrmnt/meminst.cxx (cyg_instrument_msg):
769         returns an ASCII string describing the type of event the
770         instrumentation code logged.
771
772         * include/instrmnt.h: Added function prototype.
773
774         * cdl/instrument.cdl: Configury for enabling the new function, and
775         optionally rebuilding its header file and building a host tool.
776
777         * host/instr/dump_instr.c: New file.  A host program to print the
778         instrumentation information in a human readable form.
779
780         * host/instr/instrument.sh: New file.  Script to generate table of
781         events with textual representation.
782
783         * host/instr/readme.txt: New file.  Helpful information.
784
785 2001-08-23  Nick Garnett  <nickg@redhat.com>
786
787         * include/kapidata.h (CYG_THREADTIMER_MEMBERS):
788         Substituted an expicit cyg_alarm object for CYG_ALARM_MEMBERS in
789         this definition. In some architectures (MIPS in particular) the
790         structures need to be padded to a multiple of 64 bits. This was
791         not happening with the macro substituted versions.
792         This is just a temporary fix, I'll leave it to Jifl to sort out a
793         real patch when he returns.
794
795 2001-08-23  Hugo Tyson  <hmt@redhat.com>
796
797         * src/common/thread.cxx: Properly qualify Cyg_Thread::destructors
798         array so that it builds when destructors are not used.
799
800 2001-08-23  Nick Garnett  <nickg@redhat.com>
801
802         * src/sched/mlqueue.cxx: Added code to
803         Cyg_SchedThread_Implementation::to_queue_head() to handle a NULL
804         thread queue pointer. This compensates for a minor change in
805         behaviour of the scheduler.
806
807 2001-08-22  Jonathan Larmour  <jlarmour@redhat.com>
808
809         * cdl/thread.cdl: Add kernel thread destructor options.
810         * include/kapidata.h: Add thread destructor entries to cyg_thread
811         * include/thread.hxx (Cyg_Thread): Give per-thread data indexes
812         their own type, cyg_data_index.
813         Include new thread destructor data members, and new add_destructor
814         and rem_destructor member functions.
815         * include/thread.inl: Use a cyg_data_index for per-thread data handle.
816         (add_destructor): New Cyg_Thread member function.
817         (rem_destructor): Ditto.
818         * src/common/kapi.cxx: Use cyg_data_index type for per-thread data
819         functions.
820         * src/common/thread.cxx (Cyg_Thread): initialise per-thread
821         destructors if needed.
822         Define static destructors if needed.
823         (exit): Call destructors.
824         (new_data_index): Use cyg_data_index type.
825         (free_data_index): Ditto.
826
827 2001-08-22  Hugo Tyson  <hmt@redhat.com>
828   
829         * src/sync/mutex.cxx (Cyg_Mutex): Add initialization of the
830         priority ceiling value in the non-dynamic protocol case.
831
832 2001-08-22  Nick Garnett  <nickg@redhat.com>
833
834         * tests/intr0.c: 
835         * tests/kintr0.c:
836         Swapped order of interrupt enable/disable calls to keep kernel
837         happy when assertions are enabled. Otherwise the enable call
838         complains that interrupts have not been disabled.
839
840         * src/sched/mlqueue.cxx:
841         Simplified algorithm in set_need_reschedule().
842
843         * include/smp.hxx: 
844         * include/kapidata.h: Change spinlock to be a cyg_uint32, rather
845         than a cyg_atomic.
846
847         * src/intr/intr.cxx: 
848         * include/intr.hxx:
849         Now arrange for DSRs to be called on the same CPU as the ISR. This
850         is necessary if the DSR needs to access per-CPU hardware (such as
851         interrupt controllers). This is achieved by keeping a separate DSR
852         list/table for each CPU.
853
854         * tests/smp.cxx: Some modifications to make this test work in a
855         real SMP environment.
856
857         * tests/timeslice.c: 
858         * cdl/kernel.cdl: Added timeslice test.
859
860 2001-08-21  Hugo Tyson  <hmt@redhat.com>
861
862         * src/sync/mutex.cxx (lock): Bugfix: a ceiling priority mutex
863         wasn't elevated until after it had acquired the mutex.  This meant
864         it slept with a low priority, and so did not run when awakened by
865         the release of the mutex.  The fix is to elevate the potential
866         claimant before it sleeps in contention. 
867
868         * tests/kmutex4.c: New testcase - very similar to kmutex3 but it
869         loops a load more times using different mutex priority protocols.
870         This checks that dynamically set protos do in fact behave
871         differently from one another and as they are each intended to.
872
873         * tests/kmutex3.c: Remove FIXME comments - we now test dynamic
874         protocol.
875
876         * cdl/kernel.cdl: Build the new test.
877
878 2001-08-20  Jonathan Larmour  <jlarmour@redhat.com>
879
880         * include/kapidata.h: Reorganize most struct type definitions into
881         macros to allow compatible layout with all G++ implementations that
882         align non-POD types differently from included C structures.
883         * include/kapi.h: Similarly for cyg_resolution_t.
884
885 2001-08-17  Nick Garnett  <nickg@redhat.com>
886
887         * src/sched/mlqueue.cxx (timeslice): Fix timeslice_count comparison.
888
889 2001-08-16  Hugo Tyson  <hmt@redhat.com>
890
891         * include/kapi.h (cyg_mutex_protocol): Tidy up names of mutex
892         protocol type and values.  These polluted rather in 'C'.
893
894         * src/common/kapi.cxx (cyg_mutex_set_protocol): ditto.
895
896 2001-08-15  Hugo Tyson  <hmt@redhat.com>
897 2001-08-15  Andrew Lunn <andrew.lunn@ascom.ch>
898
899         * src/common/kapi.c (cyg_thread_get_current_priority): Export
900         this function into the C api.
901         * include/kapi.h: Declaration of new function.
902
903 2001-08-14  Jonathan Larmour  <jlarmour@redhat.com>
904
905         * src/common/kapi.cxx (cyg_spinlock_spin_intsave): Cast to istate
906         to CYG_INTERRUPT_STATE * since that's what is needed.
907         (cyg_spinlock_clear_intsave): Similarly.
908
909 2001-08-10  Hugo Tyson  <hmt@redhat.com>
910
911         * cdl/synch.cdl: Re-organize the options for mutexes so they are
912         active a bit more sensibly; place the default ceiling within
913         selection of ceiling protocol, and only have a default protocol if
914         there is more than one protocol active.
915
916         * tests/mutex3.cxx: More detailed handling of the possibility of
917         ceiling protocol instead of the inherit or none cases; we can run
918         the test ok and treat as inherit if the ceiling prio is higher
919         than 5, treat as none if lower than 15, and don't check anything
920         if in between - the test runs happily.
921
922         * tests/kmutex3.c (cyg_start): New test, a KAPI translation of the
923         now-classic mutex3.cxx.
924
925         * cdl/kernel.cdl: Build tests/kmutex3.c
926
927 2001-08-06  Hugo Tyson  <hmt@redhat.com>
928
929         * src/sched/sched.cxx (unlock_inner): Fix assignment to current,
930         wouldn't build if stack checking after merger from SMP branch.
931
932 2001-08-06  Andrew Lunn   <andrew.lunn@ascom.ch>
933 2001-08-06  Hugo Tyson  <hmt@redhat.com>
934
935         * src/sync/mutex.cxx: (set_protocol) Added a function to set the
936         priority inversion protocol for a mutex.
937
938         * src/common/kapi.cxx: Export the new function above and
939         set_ceiling into the C API.
940         
941         * include/mutex.hxx (class Cyg_Mutex): New member function
942         set_protocol().
943
944         * include/kapi.h (cyg_protcol): Define new emumeration for mutex
945         priority protocol setting, and headers for the new function to set
946         it.
947
948 2001-08-03  Nick Garnett  <nickg@redhat.com>
949
950         Imported from a development branch:
951         
952         2001-07-11  Nick Garnett  <nickg@redhat.com>
953
954                 * src/sched/mlqueue.cxx: Changed behaviour of
955                 set_need_reschedule() to a better implementation of the intended
956                 algorithm.
957
958                 * include/kapi.h: 
959                 * src/common/kapi.cxx:
960                 Added API for controlling routing of interrupts to CPUs in SMP
961                 configurations.
962
963         2001-07-03  Nick Garnett  <nickg@cygnus.co.uk>
964
965                 * cdl/scheduler.cdl:
966                 * include/bitmap.hxx:
967                 * src/sched/bitmap.cxx:
968                 Fixed up bitmap scheduler so it still works within the
969                 SMP-modified scheduling infrastructure. The bitmap scheduler
970                 is not currently SMP-enabled, only single CPU configurations are
971                 supported - hence the CDL change to require this.
972
973         2001-06-29  Nick Garnett  <nickg@cygnus.co.uk>
974
975                 * src/sched/sched.cxx:
976                 Removed the call to Cyg_Interrupt::enable_interrupts() in
977                 Cyg_Scheduler::start_cpu(). This was a relic from the days when
978                 the interrupt enable state was not part of the thread state. Now
979                 it is, and loading the first thread will cause interrupts to be
980                 enabled.
981
982                 * src/intr/intr.cxx:
983                 Changed initial values of Cyg_Interrupt::disable_counter[]s to
984                 zero as a result of the change in Cyg_Scheduler::start_cpu().
985
986                 * include/kapi.h:
987                 * include/kapidata.h:
988                 * src/common/kapi.cxx: 
989                 Added API for using spinlocks. Largely so that it may be extended
990                 to the driver API.
991
992                 * include/mlqueue.hxx:
993                 * include/intr.hxx:
994                 * include/sched.hxx:
995                 Added annotations to various static variables.
996
997         2001-06-28  Nick Garnett  <nickg@cygnus.co.uk>
998
999                 * include/intr.hxx:
1000                 * src/intr/intr.cxx:
1001                 Changed behaviour of Cyg_Interrupt::disable_interrupts() and
1002                 Cyg_Interrupt::enable_interrupts(). These now claim and release a
1003                 spinlock in addition to disabling and enabling interrupts. The
1004                 original interrupt state is also preserved and restored. This is
1005                 necessary in SMP systems to allow drivers etc. to correctly
1006                 synchronize with threads and DSRs that may be running on different
1007                 CPUs. In the single CPU case this mechanism reduces to the
1008                 original simple interrupt disable code.
1009                 [Later change] Backed off addition of volatile modifier to
1010                 interrupt_disable_state.
1011
1012                 * include/smp.hxx: Some minor tidies.
1013
1014         2001-06-27  Nick Garnett  <nickg@cygnus.co.uk>
1015
1016                 * tests/release.cxx: Added spin loop in thread1 to allow thread0
1017                 to execute its wait. This is necessary in SMP systems where the
1018                 threads will execute in parallel, but is also benign in single CPU
1019                 systems.
1020
1021                 * tests/mutex2.cxx:
1022                 * tests/mutex3.cxx:
1023                 * tests/sync3.cxx: 
1024                 * tests/thread2.cxx: 
1025                 These tests depend on predicting the behaviour of threads at
1026                 different priorities to pass. In an SMP system, several threads
1027                 will run in parallel, and the execution order will not be as
1028                 expected. These tests are therefore disabled in SMP
1029                 configurations.
1030
1031                 * src/sched/mlqueue.cxx (add_thread): Moved call to
1032                 set_need_reschedule() out of test for empty queue. In SMP systems,
1033                 any addition to a queue may require a reschedule on another CPU.
1034
1035         2001-06-22  Nick Garnett  <nickg@cygnus.co.uk>
1036
1037                 * include/mlqueue.hxx:
1038                 * src/sched/mlqueue.cxx:
1039                 A major change to the way in which this scheduler works in SMP
1040                 systems. The previous version removed all runnable threads from
1041                 the run queues when they were executing. This resulted in serious
1042                 complications and messy code, particularly when dealing with
1043                 priority changes and timeslicing. The new version keeps running
1044                 threads in the run queues, just like the single-CPU version. The
1045                 main disadvantage of this is that we may have to search past
1046                 threads running on other CPUs before we find one available to run
1047                 on this CPU. However, the pending count array and map mean that we
1048                 only need search one run queue, and in any case the search remains
1049                 bounded by the number of CPUs available.
1050                 Another change is in the way that timeslicing is handled. Now, the
1051                 CPU that takes the clock interrupt decrements the timeslice counts
1052                 for all CPUs and if any go zero, sends a TIMESLICE message to
1053                 that CPU.
1054
1055                 * src/sched/sched.cxx (unlock_inner):
1056                 Removed call to requeue(), no longer needed as a result of
1057                 scheduler reorganization.
1058
1059                 * src/common/thread.cxx:
1060                 Added test in Cyg_Thread::exit() to check that the thread has not
1061                 already been killed. This is only an issue if the thread is
1062                 calling exit() when it is kill()ed from another CPU. The test is
1063                 redundant in single-CPU systems, but it does no harm having it.
1064                 Added code to Cyg_Thread::set_priority() to check for reschedule
1065                 when another thread is being changed in priority.
1066                 Added call in idle thread constructor to scheduler to install the
1067                 idle thread as the default current thread for a CPU.
1068
1069                 * include/smp.hxx:
1070                 Added CYG_KERNEL_CPU_TIMESLICE_INTERRUPT(), did some miscellaneous
1071                 tidying.
1072
1073                 * include/instrmnt.h: Added SMP_RESCHED_SEND and SMP_RESCHED_RECV
1074                 events.
1075
1076                 * cdl/kernel.cdl: Added smp test program.
1077
1078                 * tests/smp.cxx: Added this program to test SMP functionality.
1079
1080         2001-06-13  Nick Garnett  <nickg@cygnus.co.uk>
1081
1082                 * src/sched/sched.cxx:
1083                 Removed code to set up initial current thread, this is now done
1084                 in the idle thread constructor.
1085                 Added code here to set up interrupts for SMP inter-processor
1086                 interrupts. This is not very tidy and may need to be
1087                 changed in the future.
1088
1089                 * src/sched/mlqueue.cxx:
1090                 Added local set_need_reschedule() function to set the
1091                 need_reschedule flag on a suitable CPU.
1092                 Many more changes to cope with SMP systems.
1093                 NOTE: This code has all become somthing of a mess, it need to be
1094                 tidied up and the SMP-specific changes integrated better into the
1095                 code. Also, timesliceing currently only works on the CPU that
1096                 takes clock interrupts - this needs fixing.
1097
1098                 * src/common/thread.cxx:
1099                 Moved assignment of initial current thread to here from sched.cxx.
1100
1101                 * include/smp.hxx:
1102                 Changed CYG_KERNEL_CPU_INTERRUPT()
1103                 CYG_KERNEL_CPU_RESCHEDULE_INTERRUPT() since there may be other
1104                 interrupt types to worry about.
1105                 Added annotations to scheduler data items.
1106
1107                 * include/sched.hxx:
1108                 Split set_current_thread() into two functions, the original works
1109                 only on the current CPU, the new one sets another CPU's current
1110                 thread. This latter function is only used to prime the current
1111                 threads during initialization.
1112                 Added second need_reschedule() function that takes a thread
1113                 argument. This is intended to be overridden by a scheduler
1114                 specific function that sets the need_reschedule flag if the
1115                 supplied thread is more deserving of CPU time that any current
1116                 thread.
1117
1118                 * include/mlqueue.hxx:
1119                 Made cyg_scheduler_set_need_reschedule() a friend of
1120                 Cyg_Scheduler_Implementation class.
1121                 Added override set_need_reschedule() functions.
1122
1123                 * include/kapidata.h: Added cpu field to cyg_thread structure when
1124                 in SMP systems.
1125
1126                 * include/intr.hxx:
1127                 * src/intr/intr.cxx:
1128                 Added Cyg_Interrupt::set_cpu() and Cyg_Interrupt::get_cpu() for
1129                 SMP systems.
1130
1131                 * include/instrmnt.h: Added events for INTR_GET_CPU and
1132                 INTR_SET_CPU.
1133
1134         2001-05-29  Nick Garnett  <nickg@cygnus.co.uk>
1135
1136                 The following changes were all imported from the SMP branch:
1137
1138                 * tests/tm_basic.cxx:
1139                 Modified to work in SMP configuration - mostly at present by
1140                 ifdeffing out code I didn't want to fix.
1141
1142                 * include/sched.hxx:
1143                 Moved scheduler lock operation into Cyg_Scheduler_SchedLock class.
1144                 Converted current_thread, need_reschedule, and thread_switches
1145                 into CPU indexed arrays. Added member functions to get and set
1146                 these indirectly.
1147                 Added start_cpu() to do per-CPU scheduler startup.
1148
1149                 * include/sched.inl:
1150                 Converted scheduler lock/unlock functions to use new schedlock
1151                 class.
1152
1153                 * src/sched/sched.cxx:
1154                 Changed in line with sched.hxx.
1155                 Added call to requeue() in unlock_inner() to restore current
1156                 thread to run queue if necessary.       
1157                 Moved most of scheduler startup to Cyg_Scheduler::start_cpu().
1158                 Cyg_Scheduler::start() now also starts secondary CPUs in SMP
1159                 systems.
1160                 Added cyg_kernel_smp_startup() as entry point from HAL into kernel
1161                 for secondary CPUs.
1162
1163                 * include/mlqueue.hxx:
1164                 Added Cyg_RunQueue type and removed
1165                 Cyg_SchedulerThreadQueue_Implementation type.
1166                 Converted timeslice_count to CPU indexed array.
1167                 Added requeue() member function to scheduler class.
1168                 Added cpu member to thread implementation class, to record
1169                 thread's current CPU.
1170
1171                 * src/sched/mlqueue.cxx:
1172                 Changed behaviour when in SMP system to remove scheduled thread
1173                 from run queue and replace it when preempted.
1174                 Added some extra asserts, and removed some that are no longer true
1175                 in an SMP system.
1176
1177                 * src/instrmnt/meminst.cxx: In SMP systems: added spinlock to
1178                 protect instrument buffer, added CPU Id in top 4 bits of thread Id
1179                 field.
1180
1181                 * src/common/thread.cxx:
1182                 Converted to use accessor functions for need_reschedule and
1183                 current_thread.
1184                 Rearranged idle thread creation to create one for each CPU.
1185
1186                 * include/test/stackmon.h: Extended to handle stack usage for
1187                 multiple idle threads.
1188
1189                 * include/thread.inl:
1190                 Added some extra instrumentation.
1191
1192                 * include/smp.hxx:
1193                 Added this file to contain all kernel SMP support. The main
1194                 definitions exported by this file are spin lock and scheduler lock
1195                 implementation classes, for both SMP and uniprocessor
1196                 configurations.
1197
1198                 * src/intr/intr.cxx: 
1199                 * include/intr.hxx:
1200                 Converted interrupt disable counter to CPU indexed array. In
1201                 intr.cxx: added lock of scheduler lock in interrupt_end() rather
1202                 than in default interrupt VSR.
1203
1204                 * cdl/kernel.cdl: Added option to enable SMP support.
1205
1206                 * include/instrmnt.h: 
1207                 * cdl/instrument.cdl: Added SMP instrumentation.
1208
1209         2001-05-25  Nick Garnett  <nickg@cygnus.co.uk>
1210
1211                 * include/intr.hxx:
1212                 * src/intr/intr.cxx: 
1213                 Added default definition of CYGNUM_HAL_ISR_TABLE_SIZE. This is now
1214                 used to declare the chain table so that architectures which have
1215                 different sizes for the interrupt table and vector count will work
1216                 correctly.
1217
1218         2001-05-22  Nick Garnett  <nickg@cygnus.co.uk>
1219
1220                 * include/sched.hxx (class Cyg_Scheduler_Base):
1221                 Added annotation to sched_lock.
1222
1223                 * cdl/instrument.cdl:
1224                 Rename CYGNUM_KERNEL_INSTRUMENT_BUFFER_WRAP to
1225                 CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP as it appears in the code.
1226
1227 2001-07-27  Jesper Skov  <jskov@redhat.com>
1228
1229         * src/intr/intr.cxx (chain_isr): Return isr_ret so caller (which
1230         may be an arbiter) can tell if the interrupt was handled.
1231
1232 2001-07-26  Gary Thomas  <gthomas@redhat.com>
1233
1234         * src/common/clock.cxx (dsr): Fix problems mixing signed and
1235         unsigned values.  Normally only generated warnings, but...
1236
1237 2001-07-09  Jonathan Larmour  <jlarmour@redhat.com>
1238
1239         * include/sched.inl (unlock_reschedule): Fix commenting.
1240         * src/sched/sched.cxx: Improve description of unlock_inner().
1241
1242 2001-06-21  Jonathan Larmour  <jlarmour@redhat.com>
1243
1244         * src/common/thread.cxx (Cyg_Thread::Cyg_Thread): Initialize
1245         wakeup_count
1246
1247 2001-06-06  Hugo Tyson  <hmt@redhat.com>
1248
1249         * tests/clocktruth.cxx: New file.  A test to get a sanity check on
1250         whether the clock is accurate to wallclock time, only useful for
1251         humans to watch really.  But important!
1252
1253 2001-05-31  Jonathan Larmour  <jlarmour@redhat.com>
1254
1255         * include/thread.hxx (class Cyg_HardwareThread): Remove unused
1256         load_context() method.
1257         * include/thread.inl: Ditto.
1258
1259 2001-05-29  Jonathan Larmour  <jlarmour@redhat.com>
1260
1261         * src/sched/bitmap.cxx (rem_thread): No need to set need_reschedule...
1262         rescheduling will happen automatically when the state changes.
1263
1264         * src/sched/mlqueue.cxx (add_thread): No need to explicitly clear
1265         thread->queue.
1266
1267 2001-04-26  Nick Garnett  <nickg@cygnus.co.uk>
1268
1269         * tests/intr0.cxx: 
1270         * tests/kintr0.c:
1271         Fixed these two tests so that they work properly on architectures
1272         where CYGNUM_HAL_ISR_MIN is not zero. These include the x86 and
1273         V850.
1274
1275 2001-04-18  Bart Veer  <bartv@redhat.com>
1276
1277         * tests/dhrystone.c:
1278         Fix the conditional for STDIO_FORMATTED_IO
1279
1280 2001-04-17  Bart Veer  <bartv@redhat.com>
1281
1282         * tests/stress_threads.c (setup_death_alarm):
1283         Cope with synthetic target reorg
1284
1285         * tests/except1.cxx, tests/kexcept1.c:
1286         Reenable for the synthetic target
1287
1288         * tests/tm_basic.cxx:
1289         Reenable for the synthetic target
1290
1291 2001-04-17  Jesper Skov  <jskov@redhat.com>
1292
1293         * cdl/kernel.cdl: Do cache tests on E7T.
1294
1295 2001-04-05  Nick Garnett  <nickg@cygnus.co.uk>
1296
1297         * tests/flag1.cxx: Apply same changes here as were applied to
1298         kflag1 on 2000-07-17. This allows this test to run to completion
1299         in slow targets, especially simulators.
1300
1301         * tests/stress_threads.c: Reduce run time even further in
1302         simulator runs where instrumentation is enabled.
1303
1304 2001-04-03  Jesper Skov  <jskov@redhat.com>
1305
1306         * tests/dhrystone.c: Fix feature check.
1307
1308 2001-03-28  Jonathan Larmour  <jlarmour@redhat.com>
1309
1310         * cdl/kernel.cdl: Only need to compile dbg_gdb.cxx with
1311         CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
1312
1313         * src/debug/dbg_gdb.cxx: Add new dbg_thread_id() function.
1314
1315 2001-02-23  Jonathan Larmour  <jlarmour@redhat.com>
1316
1317         * include/thread.inl (attach_stack): Check for non-NULL stack base.
1318
1319 2001-02-11  Jonathan Larmour  <jlarmour@redhat.com>
1320
1321         * tests/stress_threads.c: CYGINT_ISO_STDIO_FORMATTED_IO needs a
1322         #ifdef not an #if.
1323         * tests/dhrystone.c: Ditto.
1324
1325 2001-02-04  Jonathan Larmour  <jlarmour@redhat.com>
1326
1327         * tests/kill.cxx: Increase delay for all targets, just in case some
1328         are slow.
1329
1330 2001-01-30  Hugo Tyson  <hmt@redhat.com>
1331
1332         * src/common/clock.cxx (rem_alarm): Must clear the enabled flag;
1333         this disappeared in the changes to using clists of 2001-01-09.
1334         Symptom was that an alarm, once disabled, could never be
1335         re-attached to its counter because it claimed it already was.
1336         Plus asserts with multiple disables - "bad counter object".
1337
1338 2001-01-30  Hugo Tyson  <hmt@redhat.com>
1339
1340         * src/common/thread.cxx (reinitialize): Following change of
1341         2000-12-05, if CYGFUN_KERNEL_THREADS_STACK_CHECKING, this was
1342         using the stack_base/stack_size variables directly to reinitialize
1343         the stack area.  This was wrong, and leaked store off the top and
1344         bottom of the stacks because the "buffer zone" was carved off
1345         repeatedly.  Fix is to use the published APIs which compensate.
1346
1347 2001-01-26  Nick Garnett  <nickg@cygnus.co.uk>
1348
1349         * include/mlqueue.hxx: 
1350         * src/sched/mlqueue.cxx:
1351         Restored Cyg_ThreadQueue_Implementation::remove() since it must
1352         clear the thread's queue pointer, which the base clist class
1353         remove() does not.
1354
1355 2001-01-24  Jesper Skov  <jskov@redhat.com>
1356
1357         * src/sched/mlqueue.cxx (highpri): Fix trace call.
1358
1359 2001-01-09  Nick Garnett  <nickg@cygnus.co.uk>
1360
1361         * include/mlqueue.hxx:
1362         * src/sched/mlqueue.cxx: 
1363         Converted to use clist.hxx list implementation. The main effect of
1364         this is to clean up the code and class definitions since much of
1365         what was part of the thread queue and thread classes now moves to
1366         the DNode and CList classes.
1367
1368         * include/clock.hxx:
1369         * src/common/clock.cxx: 
1370         Converted to use clist.hxx list implementation. This removes all
1371         the explicit list manipulation code from the counter and alarm
1372         classes, resulting in cleaner, easier to understand code.
1373
1374         * include/kapidata.h: Adjusted cyg_alarm struct to match Cyg_Alarm
1375         using Cyg_DNode.
1376         
1377 2000-12-22  Jonathan Larmour  <jlarmour@redhat.com>
1378
1379         * include/thread.inl (check_stack): check word alignment with CYG_WORD
1380         not cyg_uint32
1381         Add extra stack checking for when stack limits are used.
1382         (measure_stack_usage): New function to measure stack usage of the thread
1383         (attach_stack): check word alignment with CYG_WORD not cyg_uint32
1384         Initialize stack to preset value when measuring stack usage
1385         (increment_stack_limit): Conditionalize here wrt 
1386         CYGFUN_KERNEL_THREADS_STACK_CHECKING and use the version in thread.cxx
1387         instead if CYGFUN_KERNEL_THREADS_STACK_CHECKING is defined.
1388
1389         * src/common/thread.cxx (exit): If verbose stack measurement enabled,
1390         output stack usage
1391         (increment_stack_limit): Add version of this method when
1392         CYGFUN_KERNEL_THREADS_STACK_CHECKING *is* defined. This will add
1393         padding above the stack limit as necessary.
1394
1395         * include/thread.hxx (class Cyg_HardwareThread): Add
1396         measure_stack_usage() member
1397
1398         * cdl/thread.cdl (CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT):
1399         Add to implement stack usage measurement.
1400
1401         * include/kapi.h (cyg_thread_measure_stack_usage): New function
1402         * src/common/kapi.cxx (cyg_thread_measure_stack_usage): New function
1403
1404 2000-12-08  Jonathan Larmour  <jlarmour@redhat.com>
1405
1406         * cdl/thread.cdl (CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING): 
1407         Requires threads list, rather than active_if them so that
1408         inference engine can do its thang.
1409
1410 2000-12-07  Jesper Skov  <jskov@redhat.com>
1411
1412         * src/debug/dbg-thread-demux.c: Add comment about the use of
1413         DBG_SYSCALL_THREAD_VEC_NUM vs CYGNUM_CALL_IF_DBG_SYSCALL.
1414
1415 2000-12-06  Hugo Tyson  <hmt@redhat.com>
1416
1417         * include/thread.inl (attach_stack): Additional assert check for
1418         unsigned wrap of the stack size in subtracting the signature
1419         areas' size.  Also round to whole words better.
1420
1421 2000-12-05  Hugo Tyson  <hmt@redhat.com>
1422
1423         * cdl/thread.cdl (CYGFUN_KERNEL_THREADS_STACK_CHECKING): New
1424         option, to control new stack check features.  Enabled by default,
1425         but only active if CYGPKG_INFRA_DEBUG and CYGDBG_USE_ASSERTS
1426         anyway, plus checking *all* threads is possible, but default off,
1427         iff CYGVAR_KERNEL_THREADS_LIST.
1428
1429         * include/thread.hxx (class Cyg_HardwareThread): Define
1430         check_stack() function.
1431
1432         * include/thread.inl (attach_stack): Add initialization of a
1433         signature in the top and base of the stack, if so configured.
1434         (check_stack): New function to check that signature for
1435         correctness; minor re-ordering to permit more inlining.
1436
1437         * src/sched/sched.cxx (unlock_inner): Check departing and incoming
1438         thread stacks if CYGFUN_KERNEL_THREADS_STACK_CHECKING.  Also, if
1439         CYGFUN_KERNEL_ALL_THREADS_STACK_CHECKING, check all registered
1440         thread stacks.  This is placed here to get executed every
1441         clocktick and other interrupts that call DSRs, rather than messing
1442         with interrupt_end() or the idle thread.
1443
1444 2000-12-04  Hugo Tyson  <hmt@redhat.com>
1445
1446         * tests/kcache2.c (entry0): Make this more robust against a
1447         complete absence of useful caches.  Previous change was not
1448         careful enough.
1449
1450 2000-12-01  Hugo Tyson  <hmt@redhat.com>
1451
1452         * cdl/kernel.cdl: Build the kcache tests for SA11x0 family; they
1453         were being omitted by default as part of ARM family.  They work on
1454         SA1110, so this should be OK.  They're OK on EBSAs too.  See
1455         associated fix to cache macros in SA11x0 and EBSSA HALs.
1456
1457         * tests/kcache2.c (entry0): Fix the test; the problem was it
1458         assumed that a write to a previously unseen location would end up
1459         in the cache.  It ain't so on StrongARMs.  Also make tests safe
1460         wrt interrupts possibly perturbing the cache, add explicit tests
1461         for HAL_DCACHE_INVALIDATE_ALL(), ...DISABLE() and ...SYNC(), and
1462         improve the tests for cache line invalidate and store.
1463
1464 2000-10-30  Jesper Skov  <jskov@redhat.com>
1465
1466         * cdl/synch.cdl: Replaced CYGINT_KERNEL_SCHEDULER_CAN_YIELD with
1467         CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES.
1468         * cdl/scheduler.cdl:
1469         CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL requires
1470         CYGINT_KERNEL_SCHEDULER_UNIQUE_PRIORITIES.
1471
1472         * tests/thread2.cxx: Use new option.
1473         * tests/klock.c: Same.
1474         * src/common/thread.cxx: Same.
1475         * src/common/clock.cxx: Same.
1476
1477         * include/bitmap.hxx: Leave unique priority setting to CDL.
1478         * include/mlqueue.hxx: Same.
1479         * include/sched.hxx: Let CDL do sanity check of config.
1480
1481 2000-10-27  Jesper Skov  <jskov@redhat.com>
1482
1483         * cdl/scheduler.cdl: Added CYGINT_KERNEL_SCHEDULER_CAN_YIELD
1484
1485         * tests/klock.c: Avoid use of disabled features. Require scheduler
1486         that can yield.
1487
1488 2000-10-20  Jonathan Larmour  <jlarmour@redhat.com>
1489
1490         * tests/bin_sem0.cxx:
1491         * tests/bin_sem1.cxx:
1492         * tests/bin_sem2.cxx:
1493         * tests/clock0.cxx:
1494         * tests/clock1.cxx:
1495         * tests/clockcnv.cxx:
1496         * tests/cnt_sem0.cxx:
1497         * tests/cnt_sem1.cxx:
1498         * tests/except1.cxx:
1499         * tests/flag0.cxx:
1500         * tests/flag1.cxx:
1501         * tests/intr0.cxx:
1502         * tests/kill.cxx:
1503         * tests/mbox1.cxx:
1504         * tests/mqueue1.cxx:
1505         * tests/mutex0.cxx:
1506         * tests/mutex1.cxx:
1507         * tests/mutex2.cxx:
1508         * tests/mutex3.cxx:
1509         * tests/philo.cxx:
1510         * tests/release.cxx:
1511         * tests/sched1.cxx:
1512         * tests/sync2.cxx:
1513         * tests/sync3.cxx:
1514         * tests/testaux.hxx:
1515         * tests/thread0.cxx:
1516         * tests/thread1.cxx:
1517         * tests/thread2.cxx:
1518         * tests/tm_basic.cxx:
1519         Make sure default priority constructors have been invoked.
1520
1521         * include/intr.hxx (class Cyg_Interrupt): Make dsr_count volatile
1522         to prevent a potential race condition with overzealous C
1523         compilers.
1524
1525 2000-10-13  Nick Garnett  <nickg@cygnus.co.uk>
1526
1527         * src/sched/sched.cxx (unlock_inner): Added condition to test for
1528         DSRs to only call DSRs when the scheduler lock is making a 0->1
1529         transition. Otherwise there is the danger of calling DSRs when the
1530         scheduler lock is > 1. This violates our original assumptions
1531         about how the scheduler lock worked with respect to DSR. 
1532
1533         * src/intr/intr.cxx (call_pending_DSRs): Added assert to check
1534         that DSRs are only called when the scheduler lock is exactly 1.
1535
1536 2000-10-13  Jesper Skov  <jskov@redhat.com>
1537
1538         * include/intr.hxx: Fixing syntax mistake; volatile keyword must
1539         appear after the type for it to affect the pointer variable.
1540         * src/intr/intr.cxx: Same. Remove volatile from local block.
1541
1542 2000-10-05  Jesper Skov  <jskov@redhat.co.uk>
1543
1544         * src/intr/intr.cxx: Made dsr_table_tail volatile as well.
1545         * include/intr.hxx: Ditto.
1546
1547 2000-10-05  Nick Garnett  <nickg@cygnus.co.uk>
1548
1549         * src/sched/sched.cxx: 
1550         * include/sched.hxx: Converted asr_inhibit from a bool to a
1551         counter. This is necessary to permit nesting of ASR inhibiting
1552         functions.
1553
1554 2000-10-04  Jesper Skov  <jskov@redhat.co.uk>
1555
1556         * include/intr.hxx: Made dsr_list volatile.
1557         * src/intr/intr.cxx: Same. Also fix compiler warning.
1558
1559 2000-09-25  Nick Garnett  <nickg@cygnus.co.uk>
1560
1561         * src/sched/mlqueue.cxx:
1562         Added test for current thread not runnable in
1563         Cyg_Scheduler_Implementation::timeslice().  This is possible if a
1564         prior DSR has caused the current thread to be descheduled. Added
1565         an assert to Cyg_ThreadQueue_Implementation::rotate() for
1566         additional paranoia. (This problem was originally identified and
1567         fixed (differently) by Andrew Lunn <andrew.lunn@ascom.ch>.)
1568
1569 2000-09-13  Jesper Skov  <jskov@redhat.com>
1570
1571         * tests/kexcept1.c (cause_exception): Use separate cause_fpe function.
1572         * tests/except1.cxx (cause_exception): Same.
1573
1574         * tests/kexcept1.c (cause_exception): Do not use division at all.
1575         * tests/except1.cxx (cause_exception): Same.
1576
1577         * tests/kexcept1.c (cause_exception): Do not cause div-by-zero.
1578         * tests/except1.cxx (cause_exception): Same.
1579
1580 2000-09-11  Jonathan Larmour  <jlarmour@redhat.com>
1581
1582         * cdl/instrument.cdl (CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER): 
1583         Bring this option back from the dead
1584
1585 2000-09-08  Nick Garnett  <nickg@cygnus.co.uk>
1586
1587         * include/sched.hxx:
1588         * include/sched.inl:
1589         Added Cyg_Scheduler::unlock_reschedule() function. This decrements
1590         the scheduler lock by one but also permits the current thread to
1591         be rescheduled if it ready to sleep, or there is a higher priority
1592         thread ready to run. This is to support use of various
1593         synchronization objects while the scheduler lock is claimed.
1594
1595         * src/sched/sched.cxx (unlock_inner): Modified precondition to
1596         allow for functionality of unlock_reschedule().
1597
1598         * src/sched/mlqueue.cxx:
1599         Now uses Cyg_SchedulerThreadQueue_Implementation for all runqueue
1600         pointers. It was using Cyg_ThreadQueue_Implementation in some
1601         places which meant we were trying to sort the run queues!
1602         Changed yield() so it can be called with the scheduler lock
1603         claimed.
1604         Changed Cyg_Scheduler_Implementation::timeslice() to rotate the
1605         queue itself rather than call yield(). The changes to yield() make
1606         it unsafe to call here any more.
1607
1608         * include/mlqueue.hxx (class Cyg_SchedulerThreadQueue_Implementation): 
1609         Made enqueue() member public.
1610         
1611         * include/mboxt2.inl:
1612         * src/common/thread.cxx: 
1613         * src/sync/mutex.cxx: 
1614         * src/sync/cnt_sem2.cxx: 
1615         Removed assertions for zero scheduler lock and replaced some
1616         invocations of Cyg_Scheduler::unlock() with
1617         Cyg_Scheduler::unlock_reschedule() or Cyg_Scheduler::reschedule()
1618         where appropriate.
1619
1620         * tests/klock.c:
1621         * cdl/kernel.cdl:
1622         Added klock.c to test functionality while scheduler lock is claimed.
1623
1624 2000-08-17  Hugo Tyson  <hmt@cygnus.co.uk>
1625
1626         * src/sched/sched.cxx (unlock_inner): Move an assert to some place
1627         where it's true *all* the time!  There was a narrow margin where a
1628         DSR could confuse unlock_inner() by reanimating the current thread
1629         before it had a chance to sleep - hence the call appears to be
1630         pointless.  Putting the assert before the DSR calls makes sense.
1631
1632         * include/mboxt.inl:
1633         * src/sync/bin_sem.cxx:
1634         * src/sync/cnt_sem.cxx:
1635         * src/sync/flag.cxx:
1636         * src/sync/mutex.cxx:
1637         All of these now use Cyg_Scheduler::reschedule() rather than an
1638         unlock/lock pair to yield in their functions which can sleep.
1639         They therefore can be called safely and atomically with the
1640         scheduler already locked.  This is a Good Thing[tm].  Since the
1641         network stack synch primitives now use this feature, the asserts
1642         that the scheduler was not locked must disappear: this change.
1643
1644
1645 2000-08-07  Jonathan Larmour  <jlarmour@redhat.co.uk>
1646
1647         * include/mutex.hxx (class Cyg_Mutex): Add comment explaining
1648         presence of locked.
1649
1650 2000-08-04  Jonathan Larmour  <jlarmour@redhat.co.uk>
1651
1652         * tests/stress_threads.c (STACK_SIZE_HANDLER): Increase stack sizes
1653         otherwise it crashes!
1654
1655 2000-07-31  Jonathan Larmour  <jlarmour@redhat.co.uk>
1656
1657         * include/mempolt2.hxx: As per change of 2000-07-04, also delete - left
1658         behind accidentally
1659
1660 2000-07-20  Nick Garnett  <nickg@cygnus.co.uk>
1661
1662         * include/mutex.hxx (class Cyg_Mutex): Added get_ceiling()
1663         accessor function.
1664
1665         * src/sched/mlqueue.cxx: Fixed bug in sorted queue code that
1666         resulted in an infinite loop if the thread being inserted is of
1667         lower priority than all threads in the queue. This case is now
1668         detected early.
1669
1670 2000-07-17  Gary Thomas  <gthomas@redhat.com>
1671
1672         * tests/kflag1.c (FIRST_THREAD_WAIT_TIME): Parameterize thread 
1673         synchronization wait times (for understanding) and adjust for
1674         incredibly slow platforms.  [Previous value allowed for the test
1675         to get out of sync because the code ran so slowly]
1676
1677 2000-07-04  Jonathan Larmour  <jlarmour@redhat.co.uk>
1678
1679         * cdl/kernel.cdl: Remove all configury related to memory allocators,
1680         including tests. Make CYGFUN_KERNEL_API_C require CYGFUN_MEMALLOC_KAPI
1681
1682         * include/memfixed.hxx, include/mempolt2.inl, include/mempoolt.hxx,
1683           include/mempoolt.inl, include/memvar.hxx, include/mfiximpl.hxx,
1684           include/mfiximpl.inl, include/mvarimpl.hxx, include/mvarimpl.inl, 
1685           src/mem/memfixed.cxx, src/mem/memvar.cxx, tests/kmemfix1.c,
1686           tests/kmemvar1.c, tests/memfix1.cxx, tests/memfix2.cxx,
1687           tests/memvar1.cxx, tests/memvar2.cxx:
1688         Move to separate memory allocator package CYGPKG_MEMALLOC
1689         
1690         * include/kapi.h, include/kapidata.h, src/common/kapi.cxx:
1691         Remove memory allocator functionality - now implemented in
1692         CYGPKG_MEMALLOC
1693
1694         * tests/dhrystone.c:
1695         Update configuration dependencies for new isoinfra design
1696         * tests/stress_threads.c:
1697         Likewise.
1698         Also fix early termination after DEATH_TIME_LIMIT so that 
1699         allocated resources are freed, and so more appropriate
1700         statistics are reported
1701         Also update to use mallinfo() interface to memory allocator
1702
1703 2000-06-23  Hugo Tyson  <hmt@cygnus.co.uk>
1704
1705         * include/kapi.h (cyg_scheduler_read_lock): New function, to
1706         return the value of the scheduler lock; this for implementing SPLX
1707         in the network stack.
1708
1709         * src/common/kapi.cxx (cyg_scheduler_read_lock): New function.
1710
1711 2000-06-20  Nick Garnett  <nickg@cygnus.co.uk>
1712
1713         * src/sched/mlqueue.cxx (Cyg_ThreadQueue_Implementation::enqueue):
1714         Rewrote code to insert threads into priority sorted queue. The
1715         original code could not cope with a queue all of whose members
1716         were lower priority than the new thread - it looped for ever. Also
1717         provided fast paths for common and easily detected cases such as
1718         adding to a single element queue and adding at the front. By
1719         taking these cases out early, we can also simplify the code to
1720         search the queue.
1721
1722 2000-06-16  Gary Thomas  <gthomas@redhat.com>
1723
1724         * cdl/kernel.cdl: Remove exception tests for CMA230 - not supported
1725         by hardware.
1726
1727 2000-06-16  Jesper Skov  <jskov@redhat.com>
1728
1729         * src/intr/intr.cxx (chain_isr): Only call default_isr if no isrs
1730         in the chain reacted to the interrupt.
1731
1732 2000-06-15  Nick Garnett  <nickg@cygnus.co.uk>
1733
1734         * include/mutex.hxx (class Cyg_Condition_Variable): Added an
1735         inline function, get_queue(), to return a pointer to the
1736         underlying thread queue. To be used mainly for comparing with a
1737         thread's current queue to decide whether it is waiting for a
1738         condition variable.
1739
1740         * include/kapi.h:
1741         * src/common/kapi.cxx: 
1742         Changed return type of cyg_semaphore_wait() to match existing
1743         behaviour of Cyg_Counting_Semaphore::wait().
1744         Changed return type of cyg_cond_wait() to match new behaviour of
1745         Cyg_Condition_Variable::wait().
1746
1747 2000-06-09  Nick Garnett  <nickg@cygnus.co.uk>
1748
1749         * include/mutex.hxx:
1750         * src/sync/mutex.cxx:
1751         Modified non-timeout condition variable wait() API to return
1752         cyg_bool. A true result indicates that the wait() terminated
1753         normally. A false result indicates that the wait() was terminated
1754         as a result of a release() or destroy operation. For most uses
1755         this distinction is irrelevant, but in some situations it is a
1756         useful bit of information to have.
1757         Also modified timeout condition variable wait to reacquire the
1758         mutex under all circumstances. This is the correct and consistent
1759         thing to do.
1760
1761 2000-06-08  Jesper Skov  <jskov@redhat.com>
1762
1763         * src/debug/dbg-thread-demux.c: Use generic HAL feature to allow
1764         ROM/RAM intercalling.
1765
1766 2000-06-06  Jesper Skov  <jskov@redhat.com>
1767
1768         * tests/kcache1.c (entry0): Skip invalidate tests on TX49. Too slow.
1769
1770 2000-05-30  Gary Thomas  <gthomas@redhat.com>
1771
1772         * tests/dhrystone.c: Increase number of test loops for faster
1773         StrongARM platforms.
1774
1775 2000-05-22  Jonathan Larmour  <jlarmour@redhat.co.uk>
1776
1777         * cdl/scheduler.cdl (CYGIMP_KERNEL_SCHED_SORTED_QUEUES): Disable by
1778         default
1779
1780         * src/sched/mlqueue.cxx (enqueue): Add to end of thread queue even
1781         when not priority ordered
1782
1783 2000-05-20  Jonathan Larmour  <jlarmour@redhat.co.uk>
1784
1785         * include/mqueue.hxx, include/mqueue.inl:
1786         Add POSIX-style message queue implementation
1787         
1788         * cdl/kernel.cdl: Add mqueue1 test
1789         * cdl/scheduler.cdl: Add new CYGIMP_KERNEL_SCHED_SORTED_QUEUES option
1790
1791         * include/sema.hxx: Need thread.inl header, not just thread.hxx
1792         Make Cyg_Counting_Semaphore::peek() const since it is
1793
1794         * src/sync/cnt_sem.cxx, src/sync/cnt_sem2.cxx, include/sema2.hxx:
1795         Make Cyg_Counting_Semaphore{2}::peek() const since it is
1796
1797         * include/thread.hxx: don't want Cyg_Thread_queue::empty() to be marked
1798         inline in the class def, otherwise we get warnings elsewhere
1799
1800         * include/mlqueue.hxx (Cyg_ThreadQueue_Implementation):
1801         Add set_thread_queue private method
1802         Add derived class Cyg_SchedulerThreadQueue_Implementation, and
1803         make scheduler implementation use it instead of
1804         Cyg_ThreadQueue_Implementation
1805         
1806         * src/mlqueue.cxx: Fix typo
1807         Support  CYGIMP_KERNEL_SCHED_SORTED_QUEUES, i.e. allow insertion
1808         into thread queue in order of thread priority, with oldest at the
1809         front
1810         (Cyg_ThreadQueue_Implementation::set_thread_queue): Add
1811         (Cyg_SchedulerThreadQueue_Implementation::enqueue): Add, like old
1812         one, except make it FIFO instead of LIFO by inserting at end of queue
1813
1814 2000-05-16  Jesper Skov  <jskov@redhat.com>
1815
1816         * tests/dhrystone.c: More loops on the TX49
1817
1818 2000-05-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
1819
1820         * cdl/counters.cdl (CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY): 
1821         Default to CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
1822
1823 2000-05-04  Jonathan Larmour  <jlarmour@redhat.co.uk>
1824
1825         * include/instrmnt.h: Remove all CYG_UNUSED_PARAMs as they could
1826         cause problems when used with volatile arguments
1827         * src/intr/intr.cxx: Use CYG_UNUSED_PARAM to silence warning that
1828         appears because of the above change.
1829
1830 2000-05-02  Gary Thomas  <gthomas@redhat.com>
1831
1832         * tests/kintr0.c:
1833         * tests/intr0.cxx: Correct test for cases when VSR_MIN or
1834         ISR_MIN are not zero (bad assumption).
1835
1836 2000-05-02  Jonathan Larmour  <jlarmour@redhat.co.uk>
1837
1838         * cdl/thread.cdl (CYGNUM_KERNEL_THREADS_DATA_LIBC): Don't need libc
1839         slot. Replace with CYGNUM_KERNEL_THREADS_DATA_ERRNO slot instead.       
1840
1841 2000-04-28  Nick Garnett  <nickg@cygnus.co.uk>
1842
1843         * src/sched/sched.cxx (unlock_inner):
1844         A significant change to the behaviour of this function.  The
1845         new_lock argument contains the value that the scheduler lock
1846         should have after this function has completed. If it is zero then
1847         the lock is being released and some extra work (running ASRs,
1848         checking for DSRs) is done before returning. If it is non-zero
1849         then it must equal the current value of the lock, and is used to
1850         indicate that we want to reacquire the scheduler lock before
1851         returning. This latter option only makes any sense if the current
1852         thread is no longer runnable, otherwise this function will do
1853         nothing.
1854
1855         The result of this is that where we used to "blip" the scheduler
1856         lock to force a sleep, we now call reschedule(), which calls
1857         unlock_inner() with the current sched_lock value. The important
1858         difference is that there is not now the brief window between the
1859         calls where the lock is unclaimed. It also prevents ASRs being run
1860         at inopportune moments. In future this will also allow us to force
1861         threads to sleep even when they are deeply nested in the scheduler
1862         lock.
1863
1864         * include/mutex.hxx:
1865         Added Cyg_Mutex::get_owner() to return pointer to owning thread.
1866         
1867         * include/sched.hxx:
1868         * include/sched.inl:    
1869         Added new_lock argument to unlock_inner(), added reschedule().
1870         Made set_asr_inhibit() and clear_asr_inhibit() available even when
1871         ASRs are disabled.
1872
1873         * include/mboxt.inl:
1874         * src/sync/bin_sem.cxx: 
1875         * src/sync/cnt_sem.cxx:
1876         * src/sync/flag.cxx: 
1877         * src/sync/mutex.cxx: 
1878         Converted instances of "blipping" the scheduler lock into calls to
1879         Cyg_Scheduler::reschedule(), which is better behaved. Some calls
1880         to set_asr_inhibit() and clear_asr_inhibit() also added in various
1881         places.
1882
1883 2000-04-26  Jesper Skov  <jskov@redhat.com>
1884
1885         * tests/kcache1.c: Also to flush testing with unified caches.
1886
1887 2000-04-26  Jesper Skov  <jskov@redhat.com>
1888
1889         * tests/clockcnv.cxx: 
1890         * tests/dhrystone.c: 
1891         Renamed 850 HAL package.
1892         
1893 2000-04-25  Jesper Skov  <jskov@redhat.com>
1894
1895         * tests/kcache1.c: Fixed cache check to also look for unified
1896         caches.
1897
1898 2000-04-19  Jesper Skov  <jskov@cygnus.co.uk>
1899
1900         * tests/clockcnv.cxx:
1901         * tests/dhrystone.c:
1902         Only a few laps around the block on the v850...
1903
1904 2000-04-13  Nick Garnett  <nickg@cygnus.co.uk>
1905
1906         * include/clock.hxx:
1907         * src/common/clock.cxx:
1908         Added Cyg_Alarm::get_times() member function to allow reading of
1909         trigger and interval values from an alarm.
1910
1911 2000-04-12  Nick Garnett  <nickg@cygnus.co.uk>
1912
1913         * include/sched.hxx:
1914         * src/sched/sched.cxx:
1915         Added ASR support.
1916
1917         * include/thread.hxx:
1918         Made Cyg_ThreadQueue::empty() an inline in class definition.
1919
1920         * src/common/thread.cxx:
1921         Added CYG_REPORT_FUNCTION() to Cyg_Thread::exit().
1922
1923         * include/kapidata.h:
1924         Brought thread structures up to date with kernel objects.
1925
1926         * cdl/thread.cdl: 
1927         * cdl/scheduler.cdl:
1928         Added ASR configuration, minor tidies.
1929
1930 2000-04-12  Gary Thomas  <gthomas@redhat.com>
1931
1932         * src/common/kapi.cxx (cyg_scheduler_safe_lock): 
1933         * include/kapi.h: Add 'cyg_scheduler_safe_lock()' function.
1934
1935 2000-04-12  Jesper Skov  <jskov@redhat.com>
1936
1937         * cdl/interrupts.cdl: 
1938         * cdl/scheduler.cdl: 
1939         * cdl/counters.cdl: 
1940         Don't let interfaces define anything.
1941         
1942 2000-04-07  Nick Garnett  <nickg@cygnus.co.uk>
1943
1944         * include/sched.hxx:
1945         * include/thread.inl: 
1946         * src/sync/mutex.cxx: 
1947         * src/sched/sched.cxx: 
1948         * src/common/thread.cxx: 
1949         General reorganization of priority inversion protocol support,
1950         addition of priority ceiling protocol.
1951
1952         * include/mlqueue.hxx:
1953         * src/sched/mlqueue.cxx: 
1954         Added timeslicing enable support.
1955
1956         * cdl/thread.cdl: 
1957         * cdl/synch.cdl:
1958         Reorganized priority inversion protocol configuration to permit
1959         different protocols and dynamic choice.  Added configuration for
1960         condition variables to use a user-specified mutex.
1961
1962         * cdl/scheduler.cdl:
1963         Added dynamic timeslicing enable option.
1964
1965         * include/kapidata.h:
1966         Adjusted to match changes in other header files.
1967
1968         * tests/mutex3.cxx: 
1969         * tests/sync3.cxx: 
1970         Modified these tests to match new priority inversion protocols
1971         configuration options.
1972         
1973 2000-03-28  John Dallaway  <jld@cygnus.co.uk>
1974
1975         * cdl/counters.cdl,
1976           cdl/interrupts.cdl,
1977           cdl/kernel.cdl,
1978           cdl/scheduler.cdl,
1979           cdl/synch.cdl,
1980           cdl/thread.cdl:
1981
1982         Adjust documentation URLs.
1983
1984 2000-03-27  Gary Thomas  <gthomas@redhat.com>
1985
1986         * tests/except1.cxx: 
1987         * tests/kexcept1.c: Avoid trying to generate data access errors
1988         on platforms that don't support them.
1989
1990         * tests/kcache1.c: Ignore test if no [data] caches defined.
1991
1992         * tests/stress_threads.c: Infer minimal configuration for platforms
1993         with small amount of memory (as opposed to platform special cases).
1994
1995 2000-03-27  Jesper Skov  <jskov@redhat.com>
1996
1997         * src/sync/mutex.cxx: 
1998         * src/sched/sched.cxx: 
1999         * src/common/thread.cxx: 
2000         * src/common/clock.cxx:
2001         Use cyg_bool instead of bool for check_this().
2002
2003         * tests/dhrystone.c: Requires CYGPKG_LIBC_MALLOC
2004
2005 2000-03-07  Jesper Skov  <jskov@redhat.com>
2006
2007         * tests/mutex3.cxx: Minor tweak from Hugo to allow reduced runtime
2008         on sims.
2009
2010 2000-02-29  Jonathan Larmour  <jlarmour@redhat.co.uk>
2011
2012         * src/debug/dbg-thread-demux.c:
2013         CYG_HAL_SPARCLITE_SLEB -> CYGPKG_HAL_SPARCLITE_SLEB
2014         Also fix a comment typo
2015
2016 2000-02-29  Jesper Skov  <jskov@redhat.com>
2017
2018         * tests/kcache1.c: Don't run last part of test on MIPS sim - it's
2019         very slow.
2020
2021 2000-02-25  Jesper Skov  <jskov@redhat.com>
2022
2023         * tests/dhrystone.c: 
2024         * tests/tm_basic.cxx: 
2025         Don't allow use of devices for diag output when running performace
2026         tests.
2027
2028 2000-02-17  Jonathan Larmour  <jlarmour@redhat.co.uk>
2029
2030         * include/pkgconf/kernel.h: Make
2031         CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE a cdl_component
2032         since it has children now
2033
2034 2000-02-17  Jesper Skov  <jskov@redhat.com>
2035         CR101202, CR902078
2036         * include/mvarimpl.inl: Avoid unlinking the list from the head
2037         during coalescing.
2038
2039 2000-02-11  Jesper Skov  <jskov@redhat.com>
2040
2041         * tests/dhrystone.c (PASSES): Reduced for MPC8xx targets.
2042
2043 2000-02-10  Jesper Skov  <jskov@redhat.com>
2044
2045         * tests/except1.cxx (except0_main): 
2046         * tests/kexcept1.c (except0_main):
2047         Also reclaim DATA_TLB_MISS vector if available.
2048
2049 2000-02-03  Jesper Skov  <jskov@redhat.com>
2050
2051         * src/sched/lottery.cxx (schedule): CYG_HAL_POWERPC_x->CYGPKG_...
2052
2053 2000-02-01  Jonathan Larmour  <jlarmour@redhat.co.uk>
2054
2055         * tests/tm_basic.cxx (NTEST_THREADS): Reduce further to fit on small
2056         targets
2057         (NMBOXES): Likewise
2058         (NCOUNTERS): Likewise
2059
2060         * src/common/clock.cxx: Rework last change - change types of
2061         clock_dsr_read and delta to unsigned instead
2062
2063 2000-01-31  Jonathan Larmour  <jlarmour@redhat.co.uk>
2064
2065         * src/common/clock.cxx (isr): Use HAL_CLOCK_LATENCY, not HAL_CLOCK_READ
2066         (dsr): Likewise
2067         
2068         * cdl/counters.cdl (CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY): 
2069         Copy configury for this option here from include/pkgconf/kernel.h - it
2070         was left behind by accident
2071
2072 2000-01-31 Simon FitzMaurice  <sdf@cygnus.co.uk>
2073   * cdl/*.cdl:
2074
2075   Adjust help URLs in line with new doc layout.
2076   
2077 2000-01-31  Jesper Skov  <jskov@redhat.com>
2078
2079         * tests/tm_basic.cxx: Use CYG_TEST_NA insetad of PASS when not
2080         applicable.
2081
2082 2000-01-28 Simon FitzMaurice  <sdf@cygnus.co.uk>
2083   * cdl/*.cdl:
2084
2085   Adjust help URLs in line with new doc layout.
2086   
2087 2000-01-26  Hugo Tyson  <hmt@cygnus.co.uk>
2088
2089         * include/clock.hxx (class Cyg_Clock): Add members to convert to
2090         and from this clock resolution and others.
2091
2092         * include/clock.inl (convert): New Cyg_Clock member.
2093
2094         * src/common/clock.cxx (construct_converter): New routine to
2095         factorize a rational (or very near neighbour) to help with clock
2096         tick conversions for a particular clock.
2097         (get_other_to_clock_converter):
2098         (get_clock_to_other_converter): Cyg_Clock member functions to
2099         construct converters to or from this clock, using above routine.
2100
2101         * tests/clockcnv.cxx: New file: test the clock converters.
2102
2103         * tests/PKGconf.mak (TESTS): Add clockcnv to the tests.
2104
2105         * cdl/kernel.cdl: Add clockcnv to the tests.
2106
2107 2000-01-20  Hugo Tyson  <hmt@cygnus.co.uk>
2108
2109         * cdl/synch.cdl
2110         (CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE_RELAY):
2111         Change this to an active_if on simple prio-inh.  Was broken.
2112
2113 2000-01-19  Hugo Tyson  <hmt@cygnus.co.uk>
2114
2115         * cdl/*.cdl: Add descriptions to a number of options &c which were
2116         lacking same, also tidied up other typos as noticed en passant.
2117         Also reorganized calculated opts about per-thread-data in
2118         thread.cdl; these are really for info only.
2119
2120 2000-01-19  Jesper Skov  <jskov@cygnus.co.uk>
2121         CR 902054
2122         * tests/stress_threads.c: Don't assert requested priority =
2123         allocated. Allow some flexibility of handler priorities.
2124
2125 2000-01-13  Hugo Tyson  <hmt@cygnus.co.uk>
2126
2127         * tests/mutex3.cxx (control_thread): Add a CYG_TEST_INIT();
2128         Whoops!
2129
2130 2000-01-11  Hugo Tyson  <hmt@cygnus.co.uk>
2131
2132         * cdl/kernel.cdl: Add new kernel test mutex3, put in to test
2133         RELAY prio inheritance extension.
2134
2135         * tests/mutex3.cxx: New test case.  It tests mutex prio
2136         inheritance - or not - in a multiple thread manner, depending only
2137         on delays and the clock, so it tests that scheduling does the
2138         right thing, rather than simply checking reported priorities.
2139
2140         * tests/PKGconf.mak: Add new kernel test mutex3, put in to test
2141         RELAY prio inheritance extension.
2142
2143 2000-01-11  Hugo Tyson  <hmt@cygnus.co.uk>
2144
2145         * cdl/synch.cdl: New config option added,
2146         (CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE_RELAY).
2147
2148         * include/pkgconf/kernel.h: New config option added,
2149         (CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE_RELAY).
2150         It is a child of ..._PRIORITY_INHERITANCE_SIMPLE and is really
2151         only there to turn off if you really want the old implementation.
2152
2153         * src/sync/mutex.cxx (unlock): Add call to
2154         Cyg_SchedThread::relay_priority() when relinquishing the mutex, in
2155         order to relay any raised priority to the new owner.  Also count
2156         the mutex we are waiting for as well as those held for correct
2157         recovery in the case of inheriting priority then being killed, for
2158         example.
2159
2160         * include/sched.hxx (class Cyg_SchedThread::relay_priority): New
2161         member function declared.
2162
2163         * src/sched/sched.cxx (Cyg_SchedThread::relay_priority): New
2164         member function to implement pass-it-on or "discovered ceiling"
2165         priority inheritance extension to the simple algorithm.  Also use
2166         get_current_priority() in Cyg_SchedThread::inherit_priority() to
2167         let this work.
2168
2169 2000-01-11  Hugo Tyson  <hmt@cygnus.co.uk>
2170
2171         * include/clock.hxx (class Cyg_Counter::counter): make the counter
2172         volatile, otherwise a busy-wait loop for the real time clock to
2173         change never completes.
2174
2175 1999-12-23  Hugo Tyson  <hmt@cygnus.co.uk>
2176
2177         * src/sched/sched.cxx (inherit_priority): Fix bug; inheriting a
2178         2nd time would overwrite the saved initial_priority, so
2179         disinheriting had no effect.
2180
2181 1999-12-13  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2182
2183         * tests/tm_basic.cxx (run_alarm_tests): Add new measurement of
2184         latency between alarm firing and thread resume
2185
2186 1999-12-13  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2187
2188         * cdl/kernel.cdl: Fix some minor mistakes in the lists of tests to
2189         build conditionally
2190
2191 1999-12-08  John Dallaway  <jld@cygnus.co.uk>
2192
2193         * cdl/kernel.cdl:
2194
2195         Conditionally build the tests 'stress_threads', 'kcache1' and
2196         'kcache2'.
2197
2198 1999-11-30  Hugo Tyson  <hmt@cygnus.co.uk>
2199
2200         * src/common/kapi.cxx (cyg_scheduler_lock, cyg_scheduler_unlock):
2201         assert good range for sched lock, and be defensive anyway.  This
2202         is in response to a long time taken to track down a "unlocked too
2203         many times" bug.
2204
2205 1999-11-24  Gary Thomas  <gthomas@cygnus.co.uk>
2206
2207         * tests/tm_basic.cxx: Size tests based on available resources,
2208         using MLT files.  Fall back if not available.
2209
2210 1999-11-22  Nick Garnett  <nickg@cygnus.co.uk>
2211
2212         * src/sched/bitmap.cxx (Cyg_Scheduler_Implementation::add_thread):
2213         Fixed typo in assertion, and moved it to a more useful place.
2214
2215 1999-11-03  John Dallaway  <jld@cygnus.co.uk>
2216
2217         * cdl/kernel.cdl: Define all tests.
2218
2219 1999-10-29  Gary Thomas  <gthomas@cygnus.co.uk>
2220
2221         * tests/PKGconf.mak: Enable cache tests for Cirrus Logic boards.
2222
2223 1999-10-27  John Dallaway  <jld@cygnus.co.uk>
2224
2225         * cdl/kernel.cdl:
2226
2227         Specify CYGPKG_KERNEL_TESTS in terms of testing
2228         source files.
2229
2230 1999-10-26  John Dallaway  <jld@cygnus.co.uk>
2231
2232         * cdl/kernel.cdl:
2233
2234         Define initial version of CYGPKG_KERNEL_TESTS for
2235         verification purposes.
2236
2237 1999-10-19  John Dallaway  <jld@cygnus.co.uk>
2238
2239         * cdl/kernel.cdl:
2240
2241         Define CDL options for package-specific CFLAGS.
2242
2243 1999-10-08  Jesper Skov  <jskov@cygnus.co.uk>
2244
2245         * tests/kcache1.c: Fix array size.
2246
2247         * src/sched/bitmap.cxx (add_thread): 
2248         * src/sched/mlqueue.cxx (add_thread): 
2249         Check for valid thread priority.
2250
2251 1999-10-07  John Dallaway  <jld@cygnus.co.uk>
2252
2253         * cdl/counters.cdl,
2254           cdl/interrupts.cdl,
2255           cdl/scheduler.cdl:
2256
2257         Specify radio buttons using CDL interfaces.
2258
2259 1999-10-06  Bart Veer  <bartv@cygnus.co.uk>
2260
2261         * cdl/scheduler.cdl:
2262         Make the schedulers mutually exclusive via a cdl_interface
2263
2264 1999-10-05  Jesper Skov  <jskov@cygnus.co.uk>
2265
2266         * tests/kcache1.c: Reduced memory footprint.
2267
2268 1999-09-25  Jesper Skov  <jskov@cygnus.co.uk>
2269
2270         * tests/stress_threads.c: Added date header and flush() calls.
2271
2272 1999-09-16  Hugo Tyson  <hmt@cygnus.co.uk>
2273
2274         * tests/tm_basic.cxx (run_mutex_tests): Must unlock mutices before
2275         destroying, given the change below.
2276
2277         * src/common/kapi.cxx (cyg_cond_destroy): Call the correct
2278         destructor.  As it happens, it didn't matter because all these
2279         destructors do is assert the queue is empty, and the queue is the
2280         2nd word in every case.
2281         (cyg_mutex_destroy): Call the destructor at all, so that
2282         assertions are made.
2283
2284 1999-09-13  Gary Thomas  <gthomas@cygnus.co.uk>
2285
2286         * src/intr/intr.cxx (call_pending_DSRs_inner): Add assert to check
2287         for valid DSR (before trying to use it).
2288
2289 1999-09-13  Jesper Skov  <jskov@cygnus.co.uk>
2290
2291         * tests/stress_threads.c: Print out malloc system info.
2292         (print_statistics): Fix buglet.
2293
2294 1999-09-10  Jesper Skov  <jskov@cygnus.co.uk>
2295
2296         * tests/stress_threads.c: Print out more info. Reduce dump
2297         frequency as test runs.
2298
2299 1999-08-25  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2300
2301         * include/pkgconf/kernel.h: Add missing close brace in
2302         CYGIMP_KERNEL_COUNTERS_CLOCK_LATENCY CDL.
2303
2304 1999-08-24  Nick Garnett  <nickg@cygnus.co.uk>
2305
2306         * tests/kcache1.c (entry0): Depending on architecture, set
2307         cyg_test_is_simulator for last two tests. Otherwise they take far
2308         too long and time out.
2309
2310 1999-08-23  Hugo Tyson  <hmt@cygnus.co.uk>
2311
2312         * tests/intr0.cxx (vsr0): 
2313         * tests/kintr0.c (vsr0): 
2314         Add a comment to the effect that vsr0() is NOT a valid VSR on any
2315         known platform; VSRs must be writ in assembler.  Customer
2316         requested this, the examples are rather confusing otherwise.
2317
2318 1999-08-23  Nick Garnett  <nickg@cygnus.co.uk>
2319
2320         * include/pkgconf/kernel.h:
2321         * src/common/clock.cxx:
2322         * tests/tm_basic.cxx:
2323         Added CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY to enable recording
2324         of DSR latency figures. Added code controlled by this option to
2325         clock and tm_basic. Also made interrupt latency measurement
2326         primarily dependent on CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY since
2327         whether HAL_CLOCK_LATENCY is defined is not sufficient.
2328
2329 1999-08-17  John Dallaway  <jld@cygnus.co.uk>
2330
2331         * cdl/counters.cdl, cdl/interrupts.cdl, cdl/scheduler.cdl:
2332
2333         Implement radio buttons using "FIXME radio" hack in
2334         description field for now.
2335
2336 1999-08-16  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2337
2338         * src/sload/sload.c: Rename AM32 to AM31
2339
2340 1999-08-12  Nick Garnett  <nickg@cygnus.co.uk>
2341
2342         * src/debug/dbg_gdb.cxx (dbg_make_threadref): Extended test for
2343         uninitialized thread pointer.
2344
2345 1999-07-29  Jesper Skov  <jskov@cygnus.co.uk>
2346
2347         * src/sync/mutex.cxx (lock): Removed assertion again. Not possible
2348         to determine if a violation wil cause a deadlock.
2349
2350 1999-07-27  Jesper Skov  <jskov@cygnus.co.uk>
2351
2352         * src/sync/mutex.cxx (lock): Added simple assertion check for
2353         deadlocks.
2354
2355         * tests/stress_threads.c: Only allow printf from main thread to
2356         prevent deadlocks.
2357
2358 1999-07-14  Hugo Tyson  <hmt@cygnus.co.uk>
2359
2360         * tests/kcache1.c (entry0): Also perform timing tests with
2361         HAL_DCACHE_INVALIDATE_ALL and/or HAL_ICACHE_INVALIDATE_ALL in the
2362         loop if provided by the HAL.  Invalidating the Data cache can
2363         spoil clock operation, so elapsed time appears to be 0.
2364
2365         * tests/kcache2.c (entry0): Replace the "if (0)" for having a
2366         copy-back cache with a proper test on a HAL macro.  Even though I
2367         couldn't actually get those parts of the test to work on the
2368         platform I'm currently working on.
2369
2370         * tests/PKGconf.mak (TESTS): Do build kcache1 and kcache2 for the
2371         ARM_EBSA285; it seems kosher.  kcache2 does absolutely nothing, of
2372         course.
2373         
2374 1999-07-09  Jesper Skov  <jskov@cygnus.co.uk>
2375         PR 20210, 20142
2376         * tests/stress_threads.c: Shifted thread priorities to make room
2377         for main() at priority 0.
2378
2379         Fixed indentation.
2380         
2381 1999-07-08  Jesper Skov  <jskov@cygnus.co.uk>
2382         PR 20244
2383         * tests/stress_threads.c: Changed cyg_user_start() to main()
2384         ensuring a bigger stack (it calls sprintf).
2385         Increased STACK_SIZE by 2kB for printf calls.
2386
2387 1999-06-30  Jesper Skov  <jskov@cygnus.co.uk>
2388
2389         * tests/dhrystone.c: Also NA-quit if CYGPKG_INFRA_DEBUG or
2390         CYGPKG_KERNEL_INSTRUMENT are enabled.
2391
2392 1999-06-23  Jesper Skov  <jskov@cygnus.co.uk>
2393         PR 20209
2394         * tests/dhrystone.c: Use fewer loops on ARM targets - they don't
2395         have a cache.
2396
2397 1999-06-22  Nick Garnett  <nickg@cygnus.co.uk>
2398
2399         * src/intr/intr.cxx (Cyg_Interrupt::chain_isr): Was testing the wrong
2400         macro for the default ISR. Fixed.
2401
2402         * src/common/clock.cxx (Cyg_RealTimeClock::isr): Add HANDLED bit
2403         to returned value.
2404
2405 1999-06-21  Jesper Skov  <jskov@cygnus.co.uk>
2406         PR 20209
2407         * tests/dhrystone.c: Don't run test on sims or synthetic target.
2408         Only run test when compiled with optimization.
2409
2410 1999-06-18  Jesper Skov  <jskov@cygnus.co.uk>
2411
2412         * tests/dhrystone.c: Added unsupported header.
2413
2414 1999-06-10  Hugo Tyson  <hmt@cygnus.co.uk>
2415
2416         * src/debug/dbg_gdb.cxx (dbg_threadinfo): Report counted sleep
2417         correctly; both COUNTSLEEP and SLEEPING are set.
2418
2419 1999-06-01  Hugo Tyson  <hmt@masala.cygnus.co.uk>
2420
2421         * src/debug/dbg_gdb.cxx (dbg_threadinfo): Make the thread state
2422         string a little more sensible when read as plain english.
2423
2424 1999-05-31  Jesper Skov  <jskov@cygnus.co.uk>
2425
2426         * tests/dhrystone.c: 
2427         * tests/PKGconf.mak (TESTS): 
2428         Added dhrystone test.
2429
2430         Updated to 2.1 from ftp.nosc.mil
2431         
2432 1999-05-27  Nick Garnett  <nickg@cygnus.co.uk>
2433
2434         * src/intr/intr.cxx (Cyg_Interrupt::chain_isr): Calls
2435         HAL_DEFAULT_ISR if it is defined and no chained ISRs have
2436         reported that they have handled the interrupt.
2437
2438         * src/debug/dbg_gdb.cxx (dbg_make_threadref): Fixed this routine
2439         so that it copes with a NULL thread object.
2440
2441 1999-05-27  Jesper Skov  <jskov@cygnus.co.uk>
2442
2443         * tests/stress_threads.c: Output stackmon status
2444         occasionally. Output (simple) run time.
2445
2446 1999-05-27  Jesper Skov  <jskov@cygnus.co.uk>
2447
2448         * tests/kcache1.c: Added handling of unified caches.
2449
2450 1999-05-26  Jesper Skov  <jskov@cygnus.co.uk>
2451
2452         * include/test/stackmon.h: Fixed some typos and thinkos.
2453
2454         * tests/tm_basic.cxx: Include new stackmon header.
2455
2456         * src/common/kapi.cxx: 
2457         * include/kapi.h: 
2458         Added kapi support for stackmon requirements.
2459         
2460         * include/stackmon.hxx:    [deleted]
2461         * include/test/stackmon.h: [added]
2462         Made stackmon safe to use from both C and C++.
2463
2464 1999-05-25  Jesper Skov  <jskov@cygnus.co.uk>
2465
2466         * tests/stress_threads.c (setup_death_alarm): Only compile when
2467         DEATH_TIME_LIMIT is defined.
2468
2469 1999-05-25  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2470
2471         * tests/except1.cxx: 
2472         * tests/intr0.cxx (intr0_main): 
2473         * tests/kexcept1.c: 
2474         * tests/kintr0.c (kintr0_main): 
2475         Change all mentions of CYG_HAL_TX39[_JMR3904] to
2476         CYG_HAL_MIPS_TX39[_JMR3904]
2477         
2478         * tests/kcache1.c: Use HAL_DCACHE_SYNC if possible
2479
2480 1999-05-20  Hugo Tyson  <hmt@cygnus.co.uk>
2481
2482         * tests/tm_basic.cxx (run_all_tests): Added some more stack stats
2483         output using stackmon.hxx; also fixed a BUG associated with the
2484         definition of stacks in testaux.hxx (within tests dir) that was
2485         making the main stack usage bogus.
2486
2487         * include/stackmon.hxx: new file, to ease printing stuff about
2488         stack usage, particularly of interrupt stacks and the idle
2489         thread.  It's not HAL specific, and it can apply to tests outside
2490         of the kernel, which is why it's in a public include-place.
2491         It just contains inline functions which define empty if there's no
2492         handle on the symbols available, so should be safe enough.
2493
2494 1999-05-18  Jesper Skov  <jskov@cygnus.co.uk>
2495
2496         * tests/stress_threads.c (main_program): Changed behavior of
2497         cyg_thread_delete caller.
2498
2499 1999-05-18  Hugo Tyson  <hmt@cygnus.co.uk>
2500
2501         * include/kapi.h (cyg_thread_delete): is now a boolean function to
2502         indicate success.  Failure is when the thread needs to run in
2503         order to become killed.
2504
2505         * src/common/kapi.cxx (cyg_thread_delete): Try killing the thread
2506         if necessary before deleting; only run the destructor if it was
2507         killed, and tell the caller so.
2508         (cyg_thread_kill): Back to the simpler version with no priority
2509         diddling; it's up to the called to determine that it _has_ died.
2510
2511         * src/common/thread.cxx (kill): Only perform the state-changes
2512         implied by kill if the thread has not already been killed;
2513         otherwise two kill()'s will remove a thread unconditionally,
2514         whether it's in the middle of a wait that needs tidying up or not.
2515         In other words, ensure idempotency.
2516         
2517 1999-05-17  Hugo Tyson  <hmt@masala.cygnus.co.uk>
2518
2519         * src/common/kapi.cxx (cyg_thread_kill): Up the priority of the
2520         killee to make it terminate *now* if we have priorities and they
2521         are not unique, otherwise asserts are likely with the bitmap
2522         scheduler.  Likewise in thread delete.  Condition out the bodies
2523         of the priority ops if the scheduler does not support priorities.
2524
2525 1999-05-16  Gary Thomas  <gthomas@cygnus.co.uk>
2526
2527         * src/intr/intr.cxx (call_pending_DSRs): 
2528         * include/intr.hxx: Change mechanism for defining HAL function
2529         to run DSRs.  This was a "weak" symbol with override, but is now
2530         a macro in <cyg/hal/hal_intr.h>.
2531
2532 1999-05-13  Nick Garnett  <nickg@cygnus.co.uk>
2533
2534         The following changes were all made in a branch and are now being
2535         merged:
2536         
2537     1999-05-06  Nick Garnett  <nickg@cygnus.co.uk>
2538
2539         * src/debug/dbg-thread-demux.c:
2540         Use dbg-thread-syscall.h from HAL rather than local version.
2541         Made dbg_thread_syscall_rmt_1() generic to all MIPS targets.
2542
2543         * src/debug/dbg-thread-syscall.h:
2544         Removed. Replaced by identical file in hal/common.
2545         
2546     1999-04-21  Nick Garnett  <nickg@cygnus.co.uk>
2547
2548         * include/pkgconf/kernel.h:
2549         Added CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP option.
2550         Changed CYGNUM_KERNEL_COUNTERS_RTC_PERIOD to the correct value for
2551         VR4300.
2552
2553         * include/instrmnt.h: Added CYG_INSTRUMENT_EVENT_THREAD_ENTER
2554         event.
2555
2556         * src/instrmnt/meminst.cxx (cyg_instrument): Added implementation
2557         of CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP option.
2558
2559         * src/common/thread.cxx: Added extra instrumentation point on
2560         thread entry.
2561
2562 1999-05-10  Jesper Skov  <jskov@cygnus.co.uk>
2563
2564         * tests/stress_threads.c (main_program): Added workaround for a
2565         few PRs.
2566
2567 1999-05-07  Jesper Skov  <jskov@cygnus.co.uk>
2568
2569         * src/common/kapi.cxx (cyg_scheduler_unlock, cyg_scheduler_lock):
2570         Make these simple calls to the scheduler.
2571
2572 1999-05-07  Jesper Skov  <jskov@cygnus.co.uk>
2573
2574         * tests/stress_threads.c (setup_death_alarm): Reduce run time on
2575         synthetic target.
2576
2577 1999-05-06  Jesper Skov  <jskov@cygnus.co.uk>
2578         
2579         * tests/stress_threads.c: Reversed priorities of agents.
2580
2581 1999-05-06  Jesper Skov  <jskov@cygnus.co.uk>
2582         PRs 20040, (20027), 19991
2583         * tests/stress_threads.c: Added main_thread handling resource
2584         deallocation and printing.
2585
2586 1999-04-27  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2587
2588         * tests/stress_threads.c: 
2589         If there aren't enough priorities, output an N/A, rather than
2590         stopping compilation with a #error
2591
2592 1999-04-28  Jesper Skov  <jskov@cygnus.co.uk>
2593         PR 19850
2594         * tests/stress_threads.c: Don't print text from alarm handler.
2595
2596 1999-04-28  Jesper Skov  <jskov@cygnus.co.uk>
2597         PR 19945 workaround
2598         * tests/kexcept1.c: 
2599         * tests/except1.cxx:
2600         Made NA to PowerPC SIM.
2601
2602 1999-04-27  Gary Thomas  <gthomas@cygnus.co.uk>
2603
2604         * tests/tm_basic.cxx: 
2605         Use/test 'cyg_thread_delete()' function.
2606         Add ability to compute statistics with first datum removed which
2607         can show up cache effects.
2608         Show thread stack usage.
2609
2610         Fix merge screwup :-(
2611
2612 1999-04-26  Hugo Tyson  <hmt@cygnus.co.uk>
2613
2614         * include/kapi.h: Add missing function cyg_thread_delete();
2615         otherwise there is no way in the C API to re-use thread memory
2616         safely.  It just calls the destructor of the Cyg_Thread class.
2617
2618         * src/common/kapi.cxx (cyg_thread_delete): Implement it.
2619
2620 1999-04-26  Hugo Tyson  <hmt@cygnus.co.uk>
2621
2622         * tests/stress_threads.c: Commit a better version for Mark since I
2623         happen to have it here; having addressed the main concern of my
2624         approval process.  It runs better in sims so long as the
2625         constructor execution isn't messed with, nor timeslicing nor
2626         priority inheritance.
2627
2628 1999-04-23  Mark Galassi  <rosalia@cygnus.com>
2629
2630         * tests/stress_threads.c (setup_death_alarm): shortened the
2631         simulator time by another factor of 10, hoping that it will not
2632         slow down nightly testing for simulator platforms too much.
2633         (perform_stressful_tasks): added writing of a bit pattern to the
2634         malloc()-ed spaces.  Also reduced stack requirements for threads.
2635
2636 1999-04-23  Hugo Tyson  <hmt@masala.cygnus.co.uk>
2637
2638         * src/common/timer.cxx (Cyg_Timer::activate): we must also disable
2639         the alarm when resetting it so as to remove it from its queue, so
2640         that the enable afterwards places it on the right queue instead of
2641         assuming that, being enabled, it's already there.  (if not
2642         enabling, the behaviour is unchanged and correct) This was
2643         detected by uITRON tests[cx]4, with some random perms including
2644         enable CYGIMP_KERNEL_COUNTERS_MULTI_LIST,
2645         value CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE {8}.
2646         The PR is 19475.
2647         
2648 1999-04-21  Hugo Tyson  <hmt@cygnus.co.uk>
2649
2650         * tests/bin_sem1.cxx (bin_sem1_main): Doh!  Use priorities 4 and 5
2651         for the two threads so that they are unique (with a bitmap
2652         scheduler, the threads had prios 0 and 1 resp, which causes an
2653         assert in the attempt to set thread 0's prio to 1, "prios not
2654         unique").  PR 19904.
2655
2656 1999-04-20  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2657
2658         * tests/kcache2.c: 
2659         Reduce iterations for time_ilock(), time_dlock(), and test_dzero()
2660         if a simulated environment is detected
2661         Fix for PR 19853
2662
2663 1999-04-19  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2664
2665         * tests/kill.cxx: Make delay ticks greater than 1 to prevent
2666         scheduling problems if the clock rolls over immediately
2667         Fix for PR 19516
2668
2669 1999-04-20  Mark Galassi  <rosalia@cygnus.com>
2670
2671         * tests/stress_threads.c: applied Hugo's patch to fix stack sizes.
2672  
2673 1999-04-19  Hugo Tyson  <hmt@cygnus.co.uk>
2674
2675         * tests/bin_sem1.cxx (bin_sem1_main): Add priorities to the
2676         threads so that they run sequentially like the tester expected.
2677         Otherwise simple timing, and shorter timeslicing, causes failure
2678         to be reported; likewise if the kernel happens not to run entry0
2679         first!
2680         (another checkin)
2681         (bin_sem1_main): Add conditional use of set_priority on
2682         CYGIMP_THREAD_PRIORITY as it should be.
2683
2684 1999-04-14  Jesper Skov  <jskov@cygnus.co.uk>
2685
2686         * src/debug/dbg_gdb.cxx: Fixed compiler warnings, cleaned up stub
2687         requirements (removed FIX ME).
2688
2689 1999-04-14  Gary Thomas  <gthomas@cygnus.co.uk>
2690
2691         * include/intr.hxx: 
2692         * src/intr/intr.cxx (call_pending_DSRs_inner): Rework calling of
2693         DSRs to allow calls from HAL code.  This will allow for proper
2694         use of a separate interrupt stack.
2695
2696 1999-04-14  Mark Galassi  <rosalia@cygnus.com>
2697
2698         * tests/PKGconf.mak: added an ifndef for the AEB-1 board so that
2699         stress_threads is only built conditionally.
2700
2701         * tests/stress_threads.c: added more config smarts suggested by
2702         Jesper for his configurations.
2703
2704 1999-04-13  Jesper Skov  <jskov@cygnus.co.uk>
2705         PR 19822
2706         * src/debug/dbg_gdb.cxx: Current thread's registers live in
2707         registers, not _registers.
2708
2709 1999-04-13  Mark Galassi  <rosalia@cygnus.com>
2710
2711         * tests/stress_threads.c: simple stressing of thread
2712         creation/deletion with some memory-intensive and alarm-based
2713         tasks.  This version is set so that it dies after DEATH_TIME_LIMIT
2714         seconds, currently set to 120.  #undef-ing DEATH_TIME_LIMIT makes
2715         the test run forever.  This is currently not working with the
2716         bitmap scheduler, probably for some simple reason, but I have not
2717         yet broken it down to see why.
2718
2719 1999-04-12  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2720
2721         * tests/except1.cxx: 
2722         * tests/kexcept1.cxx: 
2723         Remove now unnecessary tx39-specific setting of
2724         CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS VSR
2725         Part of cleanup for PR 19731
2726
2727 1999-04-09  Hugo Tyson  <hmt@cygnus.co.uk>
2728
2729         Generally: thread->to_queue_head() moves a thread to the head of
2730         whatever queue it is on, if relevant.  This is so that a thread
2731         can change priority and then put itself at the front of its new
2732         run queue instead of the end; otherwise it yields too, which may
2733         be undesirable.  Particularly for internal use of priorities in
2734         the uITRON compatibility layer.
2735
2736         * include/thread.hxx (class Cyg_Thread): to_queue_head(): new
2737         function. Define Cyg_Thread::rotate_queue() for all schedulers.
2738         Public inheritance of Cyg_ThreadQueue_Implementation.
2739
2740         * include/thread.inl (class Cyg_Thread): to_queue_head(): new
2741         function. Define Cyg_Thread::rotate_queue() for all schedulers.
2742
2743         * include/mlqueue.hxx (class Cyg_SchedThread_Implementation):
2744         to_queue_head(), ...ThreadQueue...::to_head(): new functions.
2745
2746         * src/sched/mlqueue.cxx (class Cyg_SchedThread_Implementation):
2747         to_queue_head(), ...ThreadQueue...::to_head(): new functions.
2748
2749         * include/bitmap.hxx (class Cyg_SchedThread_Implementation): 
2750         Add empty placeholders for rotate_queue() and to_queue_head() to
2751         maintain commonality of interface.
2752
2753 1999-04-08  Jesper Skov  <jskov@cygnus.co.uk>
2754         PR 19667
2755         * kernel/current/src/common/thread.cxx:
2756         Removed obsolete Cyg_Thread constructor.
2757
2758         * kernel/current/tests/testaux.hxx:
2759         * kernel/current/tests/thread0.cxx:
2760         * kernel/current/tests/thread1.cxx:
2761         Changed to use the new Cyg_Thread constructor.
2762
2763 1999-04-08  Jesper Skov  <jskov@cygnus.co.uk>
2764
2765         * src/common/kapi.cxx: Minor indentation fixes.
2766
2767 1999-04-07  Jesper Skov  <jskov@cygnus.co.uk>
2768         PR 19743
2769         * include/mfiximpl.inl (Cyg_Mempool_Fixed_Implementation): Moved
2770         argument assertions before the first use of the arguments.
2771
2772 1999-04-07  Hugo Tyson  <hmt@cygnus.co.uk>
2773
2774         * tests/kexcept1.c (except0_main): 
2775         * tests/except1.cxx (except0_main): 
2776         Use macro HAL_VSR_SET_TO_ECOS_HANDLER() if defined, to reset
2777         likely exception handler VSRs to eCos' default handlers - the
2778         target side equivalent to CYG_TEST_GDBCMD("handle SIGBUS nostop");
2779         The VSR may not be the eCos standard one in some implementations
2780         of cooperation with CygMon.
2781
2782 1999-03-31  Nick Garnett  <nickg@cygnus.co.uk>
2783
2784         * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
2785         Fixed value of this option for TX39 66MHz to correct number.
2786
2787 1999-03-25  Gary Thomas  <gthomas@cygnus.co.uk>
2788
2789         * tests/tm_basic.cxx: More adjustments to get clock latency correct.
2790         Some fine tuning of messages and layout to fit well within 80 columns.
2791
2792 1999-03-24  Nick Garnett  <nickg@cygnus.co.uk>
2793
2794         * include/pkgconf/kernel.h: Fixed an ifdef error.
2795
2796 1999-03-24  Gary Thomas  <gthomas@cygnus.co.uk>
2797
2798         * tests/tm_basic.cxx (NTEST_THREADS): Reduce # threads so test can
2799         build on smaller machines.  Also, only adjust timings by single
2800         "overhead" value instead of the more generous 2*overhead.
2801
2802         * src/common/clock.cxx: Clock latency measurement defaults to 'off'.
2803
2804 1999-03-23  Nick Garnett  <nickg@cygnus.co.uk>
2805
2806         * tests/kcache2.c: Reduced number of loops in time_ilock(). On the
2807         MN10300 and TX39 this caused the test to timeout in the testing
2808         farm.
2809
2810 1999-03-23  Gary Thomas  <gthomas@cygnus.co.uk>
2811
2812         * tests/tm_basic.cxx: 
2813         * src/common/clock.cxx: Add 'measure_clock_latency' boolean which
2814         is used to turn clock latency measurements on/off.
2815
2816 1999-03-23  Nick Garnett  <nickg@cygnus.co.uk>
2817
2818         * tests/tm_basic.cxx (run_all_tests): Changed initial delay from
2819         100 ticks to 2. This is adequate for the purpose of letting the
2820         clock get going, while 100 ticks was too long on simulators.
2821
2822 1999-03-23  Hugo Tyson  <hmt@cygnus.co.uk>
2823
2824         * tests/kcache1.c:
2825         * tests/kcache2.c:
2826         * tests/kclock1.c:
2827         * tests/kexcept1.c:
2828         * tests/kflag1.c:
2829         * tests/kmbox1.c:
2830         * tests/kmemfix1.c:
2831         * tests/kmemvar1.c:
2832         * tests/kmutex1.c:
2833         * tests/ksched1.c:
2834         * tests/ksem1.c:
2835         * tests/kthread0.c:
2836         * tests/thread0.cxx:
2837         Use CYGNUM_HAL_STACK_SIZE_TYPICAL instead of "4096" and include
2838         hal_arch.h where necessary to get it.
2839
2840 1999-03-22  Hugo Tyson  <hmt@cygnus.co.uk>
2841
2842         * include/thread.inl (attach_stack): 
2843         Fix typo in assert; missing comma.
2844
2845 1999-03-22  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2846
2847         * src/debug/dbg-thread-syscall.h: Update copyright
2848
2849 1999-03-22  Hugo Tyson  <hmt@cygnus.co.uk>
2850
2851         * include/thread.inl:
2852         * src/common/thread.cxx:
2853         * tests/kthread1.c:
2854         * tests/testaux.hxx:
2855         * tests/thread1.cxx:
2856         * tests/thread_gdb.c:
2857         * tests/tm_basic.cxx:
2858         Use CYGNUM_HAL_STACK_SIZE_TYPICAL for the stack size instead of
2859         CYGNUM_HAL_MINIMUM_STACK_SIZE.
2860         Except for stack checking and the idle thread stack which uses 
2861         CYGNUM_HAL_STACK_SIZE_MINIMUM.
2862
2863 1999-03-19  Nick Garnett  <nickg@cygnus.co.uk>
2864
2865         * tests/kcache1.c:
2866         * tests/kcache2.c:
2867         Made all CYG_INTERRUPT_STATE variables register variables. The
2868         value of this variable has to survive cache invalidation and does
2869         not in some testing permutations that are unoptimized.
2870         Fixes PR 19165.
2871
2872         * include/kapi.h: Type of cyg_tick_count_t changed to cyg_uint64.
2873         Response to PR 19320.
2874
2875 1999-03-19  Gary Thomas  <gthomas@cygnus.co.uk>
2876
2877         * tests/tm_basic.cxx: Much better analysis of clock interrupt times.
2878         Print average deviation instead of variance.  Also print "confidence"
2879         numbers which are a measure of "how likely" a particular number would
2880         be relative to the mean and min of the sample set.
2881
2882 1999-03-17  Gary Thomas  <gthomas@cygnus.co.uk>
2883
2884         * tests/tm_basic.cxx: Improve messages and layout.
2885         Better message for 'hardware clock tick' value.
2886
2887         * src/common/clock.cxx: Be more careful about clock latency delta
2888         values that are used/kept - some hardware can yield incorrect values.
2889
2890         * tests/testaux.hxx: Use HAL recommended stack size for default.
2891
2892 1999-03-16  Nick Garnett  <nickg@cygnus.co.uk>
2893
2894         * src/common/thread.cxx:
2895         Removed MIPS specific definition of idle_thread_stack[]. This is
2896         so it gets the benefit of the redefinition of
2897         CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE. This definition has also
2898         been made static, since the MIPS compiler would otherwise put it
2899         in the .data section.
2900
2901         * include/intr.hxx (class Cyg_Interrupt):
2902         Changed implementation of Cyg_Interrupt::interrupts_enabled() to
2903         test the value of disable_counter, rather than the hardware.
2904
2905 1999-03-15  Nick Garnett  <nickg@cygnus.co.uk>
2906
2907         * tests/kcache1.c:
2908         * tests/kcache2.c: 
2909         Added interrupt disables around cache operations. If these take
2910         too long, an inopportune interrupt can disrupt the cache contents,
2911         or result in the interrupt seeing an inconsistent world.
2912
2913 1999-03-15  Gary Thomas  <gthomas@cygnus.co.uk>
2914
2915         * tests/tm_basic.cxx: Improved and cleaned up messages overall.
2916
2917 1999-03-15  Jesper Skov  <jskov@cygnus.co.uk>
2918         PR 19504
2919         * tests/tm_basic.cxx: Kill created threads after mutex, mbox and
2920         semaphore tests.
2921
2922 1999-03-12  Hugo Tyson  <hmt@cygnus.co.uk>
2923
2924         * src/debug/dbg-thread-demux.c: 
2925         Only try handling the SPARClite-SLEB vector correctly if
2926         CYG_HAL_USE_ROM_MONITOR_CYGMON ie. we are talking with CygMon.
2927         Otherwise the code is wrong, but also not used.  No matter.
2928         
2929 1999-03-12  Hugo Tyson  <hmt@cygnus.co.uk>
2930
2931         * tests/kthread1.c: 
2932         * tests/thread1.cxx: 
2933         * tests/thread_gdb.c: 
2934         Deal with CYGNUM_HAL_MINIMUM_STACK_SIZE requirement.
2935
2936 1999-03-12  Gary Thomas  <gthomas@cygnus.co.uk>
2937
2938         * include/thread.inl (attach_stack): Add check/assert for minimum
2939         stack size (HAL defined)
2940
2941 1999-03-11  Hugo Tyson  <hmt@cygnus.co.uk>
2942
2943         * src/debug/dbg-thread-demux.c (patch_dbg_syscalls): 
2944         Use the correct vector table slot for SPARClite-SLEB; it's not 15
2945         on here, it's BSP_VEC_MT_DEBUG from the hal's hal_cygm.h
2946
2947 1999-03-11  Nick Garnett  <nickg@cygnus.co.uk>
2948
2949         * tests/testaux.hxx:
2950         Move definition of inline placement operator new outside of ifdef
2951         for NTHREADS so that it can be used by other code.
2952
2953         * tests/intr0.cxx:
2954         * tests/thread1.cxx:
2955         Make use of placement operator new rather than dynamic one in
2956         intr0. Removed duplicate definition from thread1.
2957
2958 1999-03-11  Jesper Skov  <jskov@cygnus.co.uk>
2959         PR 19472
2960         * tests/kill.cxx: Increased delays for the synthetic target.
2961
2962 1999-03-11  Jesper Skov  <jskov@cygnus.co.uk>
2963         PR 19468
2964         * tests/intr0.cxx (intr0_main): 
2965         * tests/kintr0.c (kintr0_main): 
2966         Only attach interrupt handlers to vectors not in use.
2967         
2968 1999-03-10  Jesper Skov  <jskov@cygnus.co.uk>
2969         PR 19368
2970         * src/sched/sched.cxx (start): Change the dependency for
2971         referencing the RTC to make its inclusion independent of scheduler
2972         choice.
2973
2974 1999-03-10  Jesper Skov  <jskov@cygnus.co.uk>
2975         PR 17357
2976         * src/intr/intr.cxx (attach): Assert that interrupt vector attach
2977         will succeed.
2978
2979 1999-03-10  Nick Garnett  <nickg@cygnus.co.uk>
2980
2981         * include/pkgconf/kernel.h:
2982         Changed names used to control clock frequency on TX39 target.
2983
2984 1999-03-08  Gary Thomas  <gthomas@cygnus.co.uk>
2985
2986         * src/sync/mutex.cxx: Allow 'Cyg_Condition_Variable::wait()'
2987         to be entered with the scheduler locked (and thsu exit in
2988         the same state).  This will allow for fully thread-safe use
2989         of 'Cyg_Condition_Variable::wait()'.
2990
2991 1999-02-26  Jonathan Larmour  <jlarmour@cygnus.co.uk>
2992
2993         * tests/except1.cxx (except0_main): 
2994         * tests/kexcept1.c (except0_main): 
2995         Move CYG_TEST_GDBCMD back to being before CYG_TEST_INIT
2996
2997 1999-02-26  Jesper Skov  <jskov@cygnus.co.uk>
2998         PR 19283
2999
3000         * src/common/kapi.cxx: Changed cyg_exception_call_handler
3001         definition to be consistent with declaration.
3002
3003         * include/kapi.h: Change cyg_code_t to signed type.
3004
3005         * tests/except1.cxx (except0_main): 
3006         * tests/kexcept1.c (except0_main): 
3007         Init diag before making first output.
3008
3009 1999-02-26  Jesper Skov  <jskov@cygnus.co.uk>
3010         PR 19284
3011         * tests/mutex2.cxx (mutex2_main): Set priorities in a different
3012         order.
3013
3014 1999-02-25  Nick Garnett  <nickg@cygnus.co.uk>
3015
3016         * include/sched.hxx (class Cyg_Scheduler_Base):
3017         Added CYGBLD_ATTRIB_ASM_ALIAS(cyg_scheduler_sched_lock) to
3018         declaration of sched_lock member. This makes it have the given
3019         name in the object and assembler files. This in turn eliminates
3020         the need to have a C++ mangled name in the HAL.
3021
3022         * src/intr/intr.cxx:
3023         Cyg_Interrupt::detach() was not translating the vector to a table
3024         index correctly in the chained case. Fixed.
3025
3026 1999-02-24  Nick Garnett  <nickg@cygnus.co.uk>
3027
3028         * include/intr.hxx: 
3029         * src/intr/intr.cxx:
3030         Added an interrupt disable counter to
3031         Cyg_Interrupt::disable_interrupts() and
3032         Cyg_Interrupt::enable_interrupts().
3033
3034 1999-02-23  Nick Garnett  <nickg@cygnus.co.uk>
3035
3036         * include/pkgconf/kernel.h:
3037         Added support for 66MHz part.
3038
3039         * include/instrmnt.h:
3040         Added CYG_INSTRUMENT_EVENT_MUTEX_RELEASE and
3041         CYG_INSTRUMENT_EVENT_MUTEX_RELEASED. This should have been part of
3042         the 1999-02-22 checkin.
3043
3044 1999-02-23  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3045
3046         * tests/clock0.cxx, tests/clock1.cxx, tests/except1.cxx,
3047           tests/kcache1.c, tests/kcache2.c, tests/kclock0.c, tests/kclock1.c,
3048           tests/kexcept1.c, tests/kflag0.c, tests/kflag1.c, tests/kill.cxx,
3049           tests/kintr0.c, tests/kmbox1.c, tests/kmemfix1.c, tests/kmemvar1.c,
3050           tests/kmutex0.c, tests/kmutex1.c, tests/ksched1.c, tests/ksem0.c,
3051           tests/ksem1.c, tests/kthread0.c, tests/kthread1.c, tests/thread1.cxx:
3052         Use CYG_TEST_NA() rather than CYG_TEST_PASS_FINISH() for tests that
3053         are not applicable for this configuration
3054
3055 1999-02-22  Nick Garnett  <nickg@cygnus.co.uk>
3056
3057         * include/kapi.h: 
3058         * include/mutex.hxx: 
3059         * src/sync/mutex.cxx: 
3060         * src/common/kapi.cxx: 
3061         * tests/mutex2.cxx:
3062         * tests/PKGconf.mak: 
3063         Added Kernel API support for thread release, which allows a thread
3064         to be broken out of any wait. Also added support for releasing all
3065         threads waiting to lock a mutex, both at C++ and Kernel API
3066         levels. Added a test program, mutex2, to test this fuctionality
3067         out.
3068         
3069 1999-02-20  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3070
3071         * include/except.hxx: 
3072         * include/kapidata.h
3073         Rename CYG_EXCEPTION_COUNT -> CYGNUM_HAL_EXCEPTION_COUNT in line
3074         with HAL changes
3075         Rename deliver_exception() -> cyg_hal_deliver_exception()
3076         QA improvements
3077
3078         * src/common/clock.cxx:
3079         Rename CYG_VECTOR_RTC -> CYGNUM_HAL_INTERRUPT_RTC in line with
3080         HAL changes
3081
3082         * src/common/except.cxx:
3083         Rename CYG_EXCEPTION_* -> CYGNUM_HAL_EXCEPTION_* in line
3084         with HAL changes
3085         Allow for CYGNUM_HAL_EXCEPTION_MIN != 0
3086         Rename deliver_exception() -> cyg_hal_deliver_exception()
3087         Add more tracing, and fix some existing
3088         QA improvements
3089
3090         * src/intr/intr.cxx:
3091         Rename CYG_ISR_* -> CYGNUM_HAL_ISR_* in line with HAL changes
3092         Add more tracing, and fix some existing
3093         QA improvements
3094
3095         * src/sched/bitmap.cxx:
3096         * src/sched/mlqueue.cxx:
3097         * src/sync/mutex.cxx:
3098         Add more tracing and fix some existing
3099         QA improvements
3100
3101         * tests/except1.cxx:
3102         * tests/kexcept1.c
3103         Rename CYG_EXCEPTION_* -> CYGNUM_HAL_EXCEPTION_* in line
3104         with HAL changes
3105         QA improvements
3106         Use new CYG_TEST_GDBCMD to tell GDB not to stop
3107         Remove special simulator case as it should now work
3108
3109         * tests/intr0.cxx:
3110         * tests/kintr0.c:
3111         Rename CYG_ISR/VSR_* -> CYGNUM_HAL_ISR/VSR_* in line
3112         with HAL changes
3113         QA improvements         
3114
3115 1999-02-16  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3116
3117         * tests/kexcept1.c (except0_main): Tell GDB to not stop on
3118         SIGBUS or SIGSEGV since we know we're going to cause an exception
3119
3120 1999-02-12  Hugo Tyson  <hmt@cygnus.co.uk>
3121
3122         * src/common/thread.cxx (idle_thread_stack): 
3123         Override CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE if
3124         CYGNUM_HAL_MINIMUM_STACK_SIZE demands it.
3125
3126         * include/pkgconf/kernel.h (CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE):
3127         Document that this option can be overridden by HALs demands.
3128
3129 1999-02-11  Jesper Skov  <jskov@cygnus.co.uk>
3130
3131         * src/debug/dbg-thread-syscall.h: 
3132         * src/debug/dbg-thread-demux.c: 
3133         Added handling of dbg_scheduler_func calls.
3134
3135 1999-02-11  Nick Garnett  <nickg@cygnus.co.uk>
3136
3137         * include/kapi.h: 
3138         * src/common/kapi.cxx: 
3139         Added API support for per-thread data.
3140
3141         * include/kapi.h: 
3142         * src/common/kapi.cxx:
3143         * tests/ksem1.c: 
3144         * tests/tm_basic.cxx: 
3145         Changed arguments to Kernel C API semaphore functions to take
3146         cyg_count32 rather than cyg_ucount32. This makes them consistent
3147         with the underlying implementation and allows for negative counts
3148         in the future. Changed some tests to match.
3149         Fixes PR 17877.
3150
3151 1999-02-08  Jesper Skov  <jskov@cygnus.co.uk>
3152
3153         * tests/kexcept1.c (entry0): 
3154         * tests/except1.cxx (entry0): 
3155         Don't call cause_exception on SIMs.
3156
3157 1999-02-05  Jesper Skov  <jskov@cygnus.co.uk>
3158
3159         * src/common/clock.cxx (isr): Ignore a latency of 0 when finding
3160         min_clock_latency.
3161
3162 1999-02-04  Jesper Skov  <jskov@cygnus.co.uk>
3163         PR 19075
3164         * include/instrmnt.h: Slightly overdid the use of CYG_UNUSED_PARAM
3165         macros.
3166
3167 1999-02-04  Jesper Skov  <jskov@cygnus.co.uk>
3168
3169         * src/intr/intr.cxx:
3170         Make instrumentation macros always use the parameters to avoid
3171         compiler warnings.
3172
3173 1999-02-03  Jesper Skov  <jskov@cygnus.co.uk>
3174         PR 18075
3175         * tests/memfix1.cxx:
3176         * tests/kmemfix1.c:
3177         Make timing less sensitive.
3178         
3179 1999-02-02  Jesper Skov  <jskov@cygnus.co.uk>
3180
3181         * tests/bin_sem2.cxx: Fixed compiler warning.
3182
3183 1999-02-02  Jesper Skov  <jskov@cygnus.co.uk>
3184         PR 18971
3185         * tests/bin_sem2.cxx (bin_sem2_main): Reduce run time in SIM.
3186
3187 1999-02-01  Nick Garnett  <nickg@cygnus.co.uk>
3188
3189         * tests/kcache2.c: Added calls to HAL_DCACHE_SYNC() before all
3190         relevant calls to HAL_DCACHE_DISABLE(). This should have been done
3191         on 1999-01-25 where is was only done to one instance.
3192
3193 1999-02-01  Gary Thomas  <gthomas@cygnus.co.uk>
3194
3195         * tests/tm_basic.cxx: Adjust stack sizes for platforms with
3196         limited memory.
3197
3198 1999-01-28  Nick Garnett  <nickg@cygnus.co.uk>
3199
3200         * src/intr/intr.cxx: When using chained interrupts,
3201         interrupt_end() is passed NULL as the intr argument. If
3202         instrumentation is also enabled, the CYG_INSTRUMENT_INTR() calls
3203         will try to indirect through zero. Added ifdefs to avoid
3204         this. Also test intr for NULL before trying to post the DSR.
3205         Fixes PR 18771.
3206
3207 1999-01-28  Jesper Skov  <jskov@cygnus.co.uk>
3208
3209         * tests/tm_basic.cxx: Fixed strings.
3210
3211 1999-01-26  Hugo Tyson  <hmt@cygnus.co.uk>
3212
3213         * tests/kcache1.c (time0): Waste much less time if running in a
3214         simulator.  Do only 40 loops instead of 4000.
3215         In consequence the nasty meddling with MAX_STRIDE depending on
3216         HAL_xxx_SIM package definitions can go.
3217
3218 1999-01-26  Jesper Skov  <jskov@cygnus.co.uk>
3219         PR 18902
3220         * src/debug/dbg-thread-demux.c: Oops. Undid my change of 1999-01-21.
3221
3222 1999-01-25  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3223
3224         * src/common/except.cxx: Make global exception initialisation object
3225         be constructed at INTERRUPT priority
3226
3227 1999-01-25  Jesper Skov  <jskov@cygnus.co.uk>
3228         PR 18002
3229         * tests/thread_gdb.c: Ensure that there are enough priorities.
3230
3231 1999-01-25  Jesper Skov  <jskov@cygnus.co.uk>
3232         PR 18875
3233         * tests/tm_basic.cxx: Ensure that there are enough priorities.
3234
3235 1999-01-25  Nick Garnett  <nickg@cygnus.co.uk>
3236
3237         * tests/kcache2.c (test_dstore): Added call to HAL_DCACHE_SYNC()
3238         before disabling cache. On some architectures disabling the cache
3239         would cause the following call to do nothing.
3240         Fixes PR 18849.
3241
3242 1999-01-22  Jesper Skov  <jskov@cygnus.co.uk>
3243
3244         * tests/tm_basic.cxx: Don't run on Linux target.
3245
3246 1999-01-21  Hugo Tyson  <hmt@cygnus.co.uk>
3247         These changes are to get tests working with the SPARClite port; it
3248         doesn't do 8-byte register access unless it's properly aligned.
3249         
3250         * tests/philo.cxx (cyg_start): 
3251         Use tests/testaux.hxx to get new threads, to get the alignment
3252         required; see below.
3253
3254         * tests/thread2.cxx (thread2_main):
3255         Use tests/testaux.hxx to get new threads, to get the alignment
3256         required; see below.
3257
3258         * tests/tm_basic.cxx: 
3259         Larger stack for greedy processor.
3260
3261         * tests/testaux.hxx: 
3262         thread_obj[][] and stack[][] are now 8-byte aligned like certain
3263         processors require; Cyg_Thread contains cyg_tick_count which is
3264         64-bit so any "standalone" C++ object would be so aligned.  These
3265         dynamically allocated ones should be too.
3266
3267 1999-01-21  Jesper Skov  <jskov@cygnus.co.uk>
3268         PR 18747
3269         * tests/flag1.cxx: Increase delays/timeouts to prevent failure
3270         when configured with full trace logging.
3271
3272 1999-01-21  Jesper Skov  <jskov@cygnus.co.uk>
3273
3274         * src/debug/dbg-thread-demux.c: Removed PR 17327 workarounds.
3275
3276 1999-01-19  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3277
3278         * src/sched/sched.cxx (start): 
3279         CYG_REFERENCE_SYMBOL -> CYG_REFERENCE_OBJECT in line with
3280         cyg_type.h change
3281
3282 1999-01-19  Jesper Skov  <jskov@cygnus.co.uk>
3283         PR 18824
3284         * src/sync/mutex.cxx: 
3285         * include/pkgconf/kernel.h: Let
3286         CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT require
3287         CYGFUN_KERNEL_THREADS_TIMER.
3288
3289 1999-01-18  Nick Garnett  <nickg@cygnus.co.uk>
3290
3291         * src/debug/dbg-thread-demux.c (patch_dbg_syscalls): Added test
3292         for CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT in patch_dbg_syscalls().
3293
3294 1999-01-15  Gary Thomas  <gthomas@cygnus.co.uk>
3295
3296         * include/mvarimpl.inl (free): Memory list sort was incorrect.
3297
3298         * tests/PKGconf.mak (TESTS): Don't build cache tests on
3299         some platforms.
3300
3301 1999-01-15  Jesper Skov  <jskov@cygnus.co.uk>
3302         PR 18768
3303         
3304         * tests/kmbox1.c:
3305         * tests/mbox1.cxx:
3306         Increase delays used so the overhead of GDB packets doesn't make
3307         the tests fail.
3308
3309 1999-01-14  Jesper Skov  <jskov@cygnus.co.uk>
3310
3311         * src/sched/sched.cxx (start): Use new CYG_REFERENCE_SYMBOL macro.
3312
3313 1999-01-14  Nick Garnett  <nickg@cygnus.co.uk>
3314
3315         * src/debug/dbg_gdb.cxx: Extended return types to include success,
3316         fail and caller-do-it as required by msnyder.
3317
3318         * src/debug/dbg-thread-demux.c: Moved prototype of dbg_scheduler()
3319         to dbg-threads-api.h.
3320
3321 1999-01-13  Jesper Skov  <jskov@cygnus.co.uk>
3322
3323         * src/sched/sched.cxx (start): Better implementation of the
3324         real_time_clock reference.
3325
3326 1999-01-13  Jesper Skov  <jskov@cygnus.co.uk>
3327
3328         * include/pkgconf/kernel.h: Disable CYGSEM_KERNEL_SCHED_TIMESLICE
3329         in CYG_HAL_ROM_MONITOR magic.
3330
3331 1999-01-07  Jesper Skov  <jskov@cygnus.co.uk>
3332
3333         * include/pkgconf/kernel.h: Added RTC values for i386/Linux.
3334
3335
3336 1999-01-12  Nick Garnett  <nickg@cygnus.co.uk>
3337
3338         * src/debug/dbg-thread-demux.c:
3339         Changed API of patch_dbg_syscalls() to take a pointer to the start
3340         of the vector and insert several vectors.
3341
3342         * src/debug/dbg_gdb.cxx:
3343         Added dbg_scheduler() function to allow debuggers to lock and
3344         unlock the scheduler. This helps when stepping multithreaded code.
3345
3346         * include/sched.hxx:
3347         * include/sched.inl:
3348         Added Cyg_Scheduler::unlock_simple() to decrement the lock without
3349         rescheduling.
3350
3351 1999-01-05  Jesper Skov  <jskov@cygnus.co.uk>
3352         PR 18574
3353
3354         * src/sched/sched.cxx (start): Reference the real time clock to
3355         ensure it is included when linking.
3356
3357 1999-01-04  Jesper Skov  <jskov@cygnus.co.uk>
3358
3359         * tests/thread1.cxx:
3360         * tests/mbox1.cxx:
3361         * tests/kmbox1.c:
3362         * tests/kill.cxx:
3363         * tests/kflag1.c:
3364         * tests/kclock1.c:
3365         * tests/flag1.cxx:
3366         * src/common/thread.cxx:
3367         CYGFUN_KERNEL_THREADS_TIMER requires CYGVAR_KERNEL_COUNTERS_CLOCK
3368         so don't check for the latter explicitly.
3369
3370 1999-01-04  Jesper Skov  <jskov@cygnus.co.uk>
3371         PR 18573
3372
3373         * tests/thread1.cxx:
3374         * tests/mbox1.cxx:
3375         * tests/kmbox1.c:
3376         * tests/kflag1.c:
3377         * tests/flag1.cxx:
3378         Don't run tests that rely on delay() when delay() is only defined
3379         as an empty function.
3380
3381 1998-12-24  Bart Veer  <bartv@cygnus.co.uk>
3382
3383         * src/sync/mutex.cxx: 
3384         * src/sync/mbox.cxx: 
3385         * src/sync/flag.cxx: 
3386         * src/sched/sched.cxx: 
3387         * src/mem/memvar.cxx: 
3388         * src/mem/memfixed.cxx: 
3389         * src/common/thread.cxx: 
3390         * src/common/clock.cxx:
3391         * include/mempoolt.inl: 
3392         * include/mempolt2.inl: 
3393         * include/mboxt2.inl: 
3394         * include/mboxt.inl:
3395         check_this() member functions should now be const
3396
3397 1998-12-22  Nick Garnett  <nickg@cygnus.co.uk>
3398
3399         * include/instrmnt.h: Fixed casts for arguments to
3400         cyg_instrument() to work in C. Fixes PR 18413.
3401
3402 1998-12-21  Gary Thomas  <gthomas@cygnus.co.uk>
3403
3404         * include/pkgconf/kernel.h: Change AEB-1 clock scale.
3405
3406 1998-12-17  Gary Thomas  <gthomas@cygnus.co.uk>
3407
3408         * tests/tm_basic.cxx: Calculate system clock resolution
3409         based on 'CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION'
3410
3411 1998-12-16  Gary Thomas  <gthomas@cygnus.co.uk>
3412
3413         * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD): 
3414         Add support for new ARM AEB-1.
3415
3416 1998-12-16  Hugo Tyson  <hmt@masala.cygnus.co.uk>
3417
3418         * tests/intr0.cxx (intr0_main): 
3419         * tests/kintr0.c (kintr0_main): 
3420         Conditionally use a different interrupt vector number on tx39 when
3421         in the simulator (according to cyg_test_is_simulator) so that
3422         these tests execute correctly in simulators.
3423         
3424 1998-12-16  Jesper Skov  <jskov@cygnus.co.uk>
3425         PR 18546
3426
3427         * tests/kill.cxx (cyg_start): Do NOP test if required kernel
3428         functionality is disabled.
3429
3430 1998-12-15  Jesper Skov  <jskov@cygnus.co.uk>
3431
3432         * include/pkgconf/kernel.h: Changed
3433         CYGDBG_KERNEL_DEBUG_GDB_INCLUDE_STUBS to
3434         CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS.
3435
3436 1998-12-14  Jesper Skov  <jskov@cygnus.co.uk>
3437
3438         * tests/tm_basic.cxx: Made use of cyg_mbox_get() conditional on
3439         CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT.
3440
3441 1998-12-14  Jesper Skov  <jskov@cygnus.co.uk>
3442
3443         * tests/tm_basic.cxx: Added requirement for kernel RTC.
3444
3445 1998-12-11  Jesper Skov  <jskov@cygnus.co.uk>
3446
3447         * tests/kcache2.c: Added tests of three more macros.
3448
3449 1998-12-10  Jesper Skov  <jskov@cygnus.co.uk>
3450
3451         * tests/kcache2.c: Added tests of three more macros.
3452
3453 1998-12-10  Jesper Skov  <jskov@cygnus.co.uk>
3454
3455         * tests/PKGconf.mak: 
3456         * tests/kcache2.c: 
3457         Added new cache test.
3458
3459 1998-12-04  Nick Garnett  <nickg@cygnus.co.uk>
3460
3461         * include/intr.hxx:
3462         * src/intr/intr.cxx (cyg_interrupt_post_dsr): Added this function
3463         to allow functions in the HAL, which are always only in C, to call
3464         Cyg_Interrupt::post_dsr(). Have also returned post_dsr() to
3465         private parts of Cyg_Interrupt.
3466
3467 1998-12-04  Jesper Skov  <jskov@cygnus.co.uk>
3468
3469         * include/intr.hxx (class Cyg_Interrupt): Made post_dsr public so
3470         it can be called from HAL interrupt arbiters.
3471
3472 1998-12-04  Jesper Skov  <jskov@cygnus.co.uk>
3473
3474         * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
3475         Set to the correct value for a 33.333MHz clock.
3476
3477 1998-12-02  Jesper Skov  <jskov@cygnus.co.uk>
3478
3479         * src/intr/intr.cxx (interrupt_end, chain_isr): Got rid of magic
3480         interrupt constants.
3481
3482 1998-11-30  Gary Thomas  <gthomas@cygnus.co.uk>
3483
3484         * include/pkgconf/kernel.h: Fix spelling of CYGVAR_KERNEL_COUNTERS_CLOCK
3485
3486 1998-11-25  Jesper Skov  <jskov@cygnus.co.uk>
3487
3488         * src/common/thread.cxx (check_this): Check that stack_ptr is
3489         within its limits.
3490
3491 Wed Nov 25 18:45:12 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3492
3493         * include/sched.inl (unlock) (lock): 
3494         * src/common/thread.cxx (thread_entry): 
3495         * src/sched/sched.cxx (unlock_inner): 
3496
3497         Ensure all accesses to sched_lock cannot be reordered by the
3498         optimiser
3499
3500 1998-11-24  Jesper Skov  <jskov@cygnus.co.uk>
3501
3502         * src/common/thread.cxx (thread_entry): Prevent scheduler lock
3503         from being released too early.
3504
3505 1998-11-23  Nick Garnett  <nickg@cygnus.co.uk>
3506
3507         * include/pkgconf/kernel.h: 
3508         * src/common/clock.cxx:
3509         Added CYGIMP_KERNEL_COUNTERS_SORT_LIST option to determine whether
3510         the alarm lists in counters are sorted or not.
3511
3512         * tests/tm_basic.cxx: Added a test for many alarms firing
3513         separately. 
3514
3515 1998-11-23  Jesper Skov  <jskov@cygnus.co.uk>
3516
3517         * tests/kcache1.c: Only run with stride 1 on SIMs.
3518
3519 1998-11-19  Gary Thomas  <gthomas@cygnus.co.uk>
3520
3521         * tests/tm_basic.cxx: Insure appropriate kernel configuration for
3522         building tool.  Needs at least kernel C API and multi-level scheduler.
3523
3524 1998-11-18  Gary Thomas  <gthomas@cygnus.co.uk>
3525
3526         * tests/tm_basic.cxx: Add interrupt latency support.  Print 
3527         results to 10ns accuracy.
3528
3529         * tests/PKGconf.mak: Add 'tm_basic' (the kernel timing test
3530         program) to list of built tests.
3531
3532         * src/intr/intr.cxx: Change usage of HAL_INTERRUPT_MASK to have
3533         trailing ';' to match similar macros.
3534
3535         * src/common/clock.cxx: 
3536         * include/pkgconf/kernel.h: Add CDL option 
3537         CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY used to define if interrupt
3538         latency measurements should be built into kernel.
3539
3540 1998-11-17  Jesper Skov  <jskov@cygnus.co.uk>
3541
3542         * include/pkgconf/kernel.h: Renamed CYG_HAL_POWERPC_MP860 to
3543         CYG_HAL_POWERPC_MPC860.
3544
3545
3546 1998-10-28  David Moore  <dsm@keema.cygnus.co.uk>
3547
3548         * include/pkgconf/kernel.h
3549         (CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION): Changed default value for
3550         MIPS simulator to be 0.01 secs instead of 0.001 seconds.
3551
3552 1998-10-28  Jesper Skov  <jskov@cygnus.co.uk>
3553
3554         * tests/kcache1.c (HAL_DCACHE_PURGE_ALL): Fixed compiler problem
3555         on PowerPC.
3556
3557 1998-10-27  Nick Garnett  <nickg@cygnus.co.uk>
3558
3559         * tests/kcache1.c:
3560         Added calls to HAL_DCACHE_PURGE_ALL() before each test.  Added
3561         local version of HAL_DCACHE_PURGE_ALL() if this is not supplied by
3562         the HAL.
3563
3564 1998-10-27  Hugo Tyson  <hmt@cygnus.co.uk>
3565
3566         * src/common/thread.cxx (wake): 
3567         Remove the thread unconditionally from any queue it was on; for we
3568         have just become not-asleep, so it must be OK.  (Bug was: it
3569         didn't happen in transit WAIT-SUSPEND -> SUSPEND, so synch object
3570         still believed the task was waiting on it).  PR#17998
3571
3572 1998-10-26  Jesper Skov  <jskov@cygnus.co.uk>
3573         PR 17527, PR 17837
3574
3575         * tests/kcache1.c: 
3576         * tests/kclock0.c: 
3577         * tests/kclock1.c: 
3578         * tests/clock1.cxx: 
3579         * tests/clock0.cxx: 
3580         Do N/A PASS when kernel real-time clock is configured out.
3581
3582 1998-10-26  Jesper Skov  <jskov@lassi.cygnus.co.uk>
3583         PR 17866
3584
3585         * include/pkgconf/kernel.h
3586         (CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE): Doubled to prevent stack
3587         overruns on PowerPC.
3588
3589 1998-10-26  Jesper Skov  <jskov@cygnus.co.uk>
3590         PR 17987
3591
3592         * src/debug/dbg_gdb.cxx (dbg_threadinfo): Removed "more: <none>"
3593         output.
3594
3595 1998-10-23  John Dallaway  <jld@cygnus.co.uk>
3596
3597         * tests/tm_basic.cxx: Added basic timing test.
3598
3599 1998-10-23  Nick Garnett  <nickg@cygnus.co.uk>
3600
3601         * include/instrmnt.h:
3602         Improved documentation of cyg_instrument_enable() and
3603         cyg_instrument_disable().
3604
3605         * src/instrmnt/meminst.cxx:
3606         Added code to enable and disable whole groups of events.
3607
3608 1998-10-23  Jesper Skov  <jskov@lassi.cygnus.co.uk>
3609
3610         * include/generic-stub.h: Deleted. It was moved to hal common some
3611         time ago.
3612
3613 Fri Oct 23 04:45:12 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3614
3615         * tests/kcache1.c: 
3616         Remove forced warning of a warning which no longer applies
3617
3618 1998-10-22  Nick Garnett  <nickg@cygnus.co.uk>
3619
3620         * src/common/clock.cxx:
3621         Stop searching the alarm list when the current alarm is in the
3622         future in Cyg_Counter::tick().  Changed sense of comparison in
3623         Cyg_Counter::add_alarm() to sort alarms in ascending order.
3624
3625 Thu Oct 22 18:21:50 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3626
3627         * include/pkgconf/kernel.h: 
3628         Fix commenting within CDL "comments"
3629
3630 Thu Oct 22 17:25:45 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3631
3632         * include/pkgconf/kernel.h: 
3633         Remove CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER configuration
3634         option. For PR 17838
3635
3636 1998-10-21  Nick Garnett  <nickg@cygnus.co.uk>
3637
3638         * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
3639         Changed value for JMR3904 board to 15360 which is correct for a
3640         24.576MHz board rather than 25MHz as before.
3641
3642         * src/common/thread.cxx:
3643         Exchanged stack_base and stack_size in idle thread constructor.
3644
3645 1998-10-20  Hugo Tyson  <hmt@cygnus.co.uk>
3646
3647         * tests/kflag1.c (kflag1_main): 
3648         Only mess with f2 if it exists, ie. CYGFUN_KERNEL_THREADS_TIMER.
3649
3650 1998-10-19  Mark Galassi  <rosalia@cygnus.com>
3651
3652         * include/pkgconf/kernel.h: updated the doc URL
3653
3654 1998-10-19  Hugo Tyson  <hmt@cygnus.co.uk>
3655
3656         * include/kapi.h: 
3657         * include/kapidata.h (struct cyg_flag_t): 
3658         * src/common/kapi.cxx: 
3659         Add flags (Cyg_Flag, kernel.../flag.hxx) to the C API.
3660
3661         * tests/PKGconf.mak (TESTS): 
3662         Add new tests for flags via the C API.
3663
3664         * tests/kflag0.c: 
3665         * tests/kflag1.c: 
3666         New tests (well, versions of the plain C++ versions flag0.cxx and
3667         flag1.cxx) for flags via the kernel C API.
3668         
3669 1998-10-19  Bart Veer  <bartv@cygnus.co.uk>
3670
3671         * include/pkgconf/kernel.h:
3672         Fixed description of clock resolution.
3673
3674 1998-10-17  Bart Veer  <bartv@cygnus.co.uk>
3675
3676         * include/pkgconf/kernel.h:
3677         Added a way of configuring the clock interrupt frequency.
3678
3679 Thu Oct 15 21:31:58 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3680
3681         * include/pkgconf/kernel.h:
3682         Allow kernel to be disabled now
3683
3684         * src/common/delete.cxx, src/common/memcpy.c, src/common/memset.c:
3685         Move these files to the infra package
3686
3687         * src/PKGconf.mak:
3688         Don't build the above files any more
3689
3690         Above changes are required for PR 17229
3691
3692 1998-10-15  Hugo Tyson  <hmt@masala.cygnus.co.uk>
3693
3694         * include/mempoolt.inl (Cyg_Mempoolt): 
3695         * include/mempolt2.inl (Cyg_Mempolt2): 
3696         Flesh out the destructors to awaken any waiting threads
3697         with reason Cyg_Thread::DESTRUCT to support uITRON
3698         create and delete of memory pool objects.
3699         Note that only template mempolt2 is actually used.
3700         
3701 Wed Oct 14 21:45:54 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3702
3703         * tests/thread_gdb.c: 
3704         Remove unnecessary inclusion of <cyg/kernel/diag.h>
3705
3706         * tests/kcache1.c: 
3707         Add a warning to expect the "function declaration isn't a
3708         prototype" warning from infra/diag.h
3709
3710 1998-10-14  Hugo Tyson  <hmt@cygnus.co.uk>
3711
3712         * src/common/thread.cxx (kill,reinitialize): 
3713         Do not refer to member timer unless CYGFUN_KERNEL_THREADS_TIMER is
3714         defined.
3715         
3716 1998-10-14  Nick Garnett  <nickg@cygnus.co.uk>
3717
3718         * src/debug/dbg-thread-demux.c:
3719         Now get dbg-threads-api.h from HAL.
3720
3721         * src/debug/dbg_gdb.cxx:
3722         Tidied up info sent back by dbg_threadinfo().
3723
3724         * src/common/thread.cxx:
3725         Changed constructor of idle thread to include initial priority and
3726         a thread name.
3727
3728         * include/pkgconf/kernel.h:
3729         Moved GDB stub configuration code out to hal.h.
3730
3731         * include/ktypes.h:
3732         Moved definition of CYG_LABEL_NAME() out to cyg_type.h.
3733
3734         * src/debug/PKGconf.mak:
3735         * src/debug/dbg-threads-api.h:
3736         * src/debug/generic-stub.c:
3737         * src/debug/stubrom.c:
3738         * src/debug/thread-packets.c:
3739         * src/debug/thread-pkts.h:
3740         These files have all be relocated to hal/common.
3741
3742 1998-10-14  Hugo Tyson  <hmt@cygnus.co.uk>
3743
3744         * include/thread.hxx (class Cyg_Thread): 
3745         Add public members get_stack_base(), get_stack_size() and
3746         get_stack_limit();
3747         Add private members add_to_list() and remove_from_list() to
3748         centralize handling of the CYGVAR_KERNEL_THREADS_LIST as it is
3749         known.
3750
3751         * include/thread.inl (class Cyg_Thread): 
3752         Add public members get_stack_base(), get_stack_size() and
3753         get_stack_limit();
3754
3755         * src/common/thread.cxx: 
3756         Add private members add_to_list() and remove_from_list() to
3757         centralize handling of the CYGVAR_KERNEL_THREADS_LIST as it is
3758         known.
3759         Tidy up the two constructors to use them.
3760         Add CYG_REPORT_RETURN()/_RETVAL(...) logging throughout.
3761         Tidy up reinitialize() to use the 6-argument constructor,
3762         thus preserving the thread name.
3763         Fix some bugs in the CYGVAR_KERNEL_THREADS_LIST stuff where
3764         re-adding a thread caused loops in the list, and the like.
3765         Fix bug in set_priority() when the thread is asleep but NOT on any
3766         queue, such as a plain counted_sleep().
3767
3768 1998-10-14  Jesper Skov  <jskov@cygnus.co.uk>
3769
3770         * src/debug/thread-packets.c: 
3771         * src/debug/dbg_gdb.cxx: 
3772         Don't include hal_stub.h unless it's really, really, really
3773         needed.
3774                 
3775 1998-10-14  Jesper Skov  <jskov@cygnus.co.uk>
3776
3777         * src/debug/dbg_gdb.cxx: Don't include hal_stub.h unless it's really
3778         needed.
3779
3780 1998-10-13  Jesper Skov  <jskov@cygnus.co.uk>
3781
3782         * src/debug/generic-stub.c: Added thread support. Renaming a few
3783         functions/variables to match the most recent libstub
3784         generic-stub.c.
3785         Use thread_get_register & thread_put_register when handling GDB
3786         register packets.
3787
3788         * src/debug/dbg_gdb.cxx (dbg_getthreadreg, dbg_getthreadreg):
3789         DTRT for current thread when CygMon is not configured.
3790         
3791         * src/debug/dbg_gdb.cxx (dbg_threadlist, dbg_getthreadreg,
3792         dbg_getthreadreg): return true/false rather than 0, 1, -1.
3793         
3794         * src/debug/dbg_gdb.cxx:
3795         * src/debug/dbg-threads-api.h: 
3796         Added dbg_currthread_id.
3797
3798 1998-10-08  Jesper Skov  <jskov@lassi.cygnus.co.uk>
3799
3800         * src/debug/generic-stub.c: 
3801         * src/debug/generic-stub.h: 
3802         Added control of interrupts.
3803         Removed unused functions set_debug_trap and initialize_stub.
3804         
3805 Tue Oct 13 17:36:29 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
3806
3807         * src/test/tsttracc.c (cyg_start): 
3808         Replace CYG_REPORT_FUNCARGSVOID with the correct
3809         CYG_REPORT_FUNCARGVOID
3810
3811 1998-10-09  Hugo Tyson  <hmt@cygnus.co.uk>
3812
3813         * src/common/thread.cxx: 
3814         clear_timer() is a static which always affects the executing
3815         thread and none other.  Removed the "foo->" from various
3816         "foo->clear_timer()" calls to make this less confusing.
3817         Ditto set_timer().
3818         Changed a "clear_timer()" call to "timer.disable()" and added one
3819         so that they affect _this_ thread, the thread which is being
3820         kill()ed or reinitialize()d rather than the killer or the
3821         resuscitator.  Otherwise the alarm list can still get a loop in
3822         it when a thread's killed when waiting with a timeout and
3823         restarted soon enough.
3824         
3825 1998-10-08  Hugo Tyson  <hmt@cygnus.co.uk>
3826
3827         In general, these changes are to support create/delete of uITRON
3828         objects; this requires that an object can be destroyed whilst
3829         there are threads waiting on it, and that they shall be awoken
3830         with a specific return code.
3831
3832         * include/thread.hxx:
3833         Cyg_Thread::DESTRUCT added to wake reasons, to deal with an object
3834         being destroyed whilst a thread is waiting on it; it's handled in
3835         a manner very similar to release() and BREAK wake_reason.
3836         
3837         * src/common/thread.cxx: 
3838         thread_entry(): threads now exit() if the entry_point returns.
3839         Cyg_Thread() constructors now initialize wake_reason to NONE.
3840         reinitialize() clears any pending timeout before calling
3841         constructors.
3842         counted_sleep( [timeout] ) now both deal with the wake reason in
3843         general, and with DESTRUCT in particular.
3844         exit() now clears any pending timeout.
3845         kill() now force_resumes the thread first.
3846         kill() now does not explicitly remove the thread from any queue
3847         it's on; wake() does that for you anyway.
3848         delay() clears the timer just in case and handles DESTRUCT
3849         properly.
3850         DESTRUCT added to various switches for completeness.
3851
3852         The fixes to counted_sleep()[x2] and kill() are a bugfix for
3853         PR#17688.
3854
3855         * include/flag.hxx:
3856         * src/sync/flag.cxx:
3857         Add an argument, defaulting to 0, to the constructor which sets
3858         the initial flag value.
3859         Add handing of DESTRUCT wake reason.
3860         Add a destructor which wakes all threads with DESTRUCT
3861         wake_reason.
3862
3863         * include/mboxt2.inl:
3864         Add handing of DESTRUCT wake reason.
3865         Add a destructor which wakes all threads with DESTRUCT
3866         wake_reason.
3867
3868         * src/sync/cnt_sem2.cxx:
3869         Add handing of DESTRUCT wake reason.
3870         Add a destructor which wakes all threads with DESTRUCT
3871         wake_reason.
3872         Correct typo in logic for queueing a waiting thread in
3873         Cyg_Counting_Semaphore2::wait( cyg_tick_count abs_timeout ).
3874         This is a bugfix for PR#17687.
3875
3876         * include/mboxt.inl:
3877         * include/mempoolt.inl:
3878         * include/mempolt2.inl:
3879         * src/sync/bin_sem.cxx:
3880         * src/sync/cnt_sem.cxx:
3881         * src/sync/mutex.cxx:
3882         All these gain handling of the DESTRUCT wake_reason, that's all.
3883         
3884 1998-10-08  Gary Thomas  <gthomas@penang.cygnus.co.uk>
3885
3886         * include/pkgconf/kernel.h: 
3887         Add support for new architecture
3888
3889 1998-10-07  Nick Garnett  <nickg@cygnus.co.uk>
3890
3891         * tests/kcache1.c (entry0):
3892         Replaced CYG_TEST_FINISH() with CYG_TEST_PASS_FINISH().
3893
3894         * src/debug/dbg-thread-demux.c:
3895         Added dbg_thread_syscall_rmt_1() to save/set and restore the $gp
3896         register values when being called from Cygmon.
3897
3898 Sun Sep 27 20:12:15 1998  David Moore  <dsm@keema.cygnus.co.uk>
3899
3900         * include/mlqueue.hxx: 
3901         * include/bitmap.hxx: 
3902         Disallow more than 32 priority levels
3903         
3904         * include/pkgconf/kernel.h:
3905         Changed range of allowed levels from 64 to 32
3906
3907 1998-09-27  Nick Garnett  <nickg@cygnus.co.uk>
3908
3909         * tests/memfix2.cxx:
3910         Changed message to say "Fixed memory pool 2 OK" rather than
3911         "Variable memory pool 2 OK".
3912
3913 1998-09-26  Bart Veer  <bartv@cygnus.co.uk>
3914
3915         * include/intr.hxx (DSRs_pending):
3916         PR 17500: if DSR support is disabled completely then this inline
3917         function should not be defined at all.
3918
3919 1998-09-26  Nick Garnett  <nickg@cygnus.co.uk>
3920
3921         * tests/kcache1.c:
3922         Added this test program for cache API. Includes some performance
3923         testing.
3924
3925 1998-09-25  Nick Garnett  <nickg@cygnus.co.uk>
3926
3927         * src/debug/dbg_gdb.cxx:
3928         Removed some debugging code.
3929
3930         * tests/thread_gdb.c:
3931         Added this test program to allow for GDB thread support testing.
3932
3933 1998-09-25  Bart Veer  <bartv@cygnus.co.uk>
3934
3935         * include/pkgconf/kernel.h:
3936         The GDB thread support requires the kernel to keep track of all
3937         threads on a linked list. This is a separate option. An additional
3938         requires statement enforces the dependency.
3939         
3940 1998-09-25  Nick Garnett  <nickg@cygnus.co.uk>
3941
3942         * src/debug/dbg-thread-demux.c:
3943         Added include of <pkgconf/kernel.h>, removed debug code.
3944
3945 1998-09-24  Bart Veer  <bartv@cygnus.co.uk>
3946
3947         * src/debug/dbg-thread-demux.c (dbg_thread_syscall_rmt):
3948         PR 17327. If kernel gdb thread support is disabled, do not compile
3949         in the relevant cases in the rmt switch statement. This is a
3950         partial solution to the general problem of how the HAL, kernel,
3951         cygmon, and gdb interact.
3952
3953 1998-09-24  Nick Garnett  <nickg@cygnus.co.uk>
3954
3955         * src/common/clock.cxx (Cyg_RealTimeClock):
3956         Changed clock priority from zero to one, since it is now used to
3957         set the hardware interrupt priority.
3958
3959         * src/intr/intr.cxx:
3960         Cyg_Interrupt::chain_isr() now only calls interrupt objects that
3961         have the matching vector number.
3962         Call HAL_INTERRUPT_SET_LEVEL() when attaching interrupts using the
3963         priority passed in the constructor.
3964         Added call to HAL_TRANSLATE_VECTOR() for attaching chained
3965         interrupts.
3966
3967         * include/instrmnt.h (CYG_INSTRUMENT_EVENT_INTR_CHAIN_ISR):
3968         Added this event.
3969
3970 Thu Sep 24 11:07:12 1998  David Moore  <dsm@keema.cygnus.co.uk>
3971
3972         * tests/except1.cxx: 
3973         * tests/kexcept1.cxx: 
3974         Made exception tests detect when CYGPKG_KERNEL_EXCEPTIONS
3975         is disabled.
3976         
3977
3978 1998-09-22  Bart Veer  <bartv@cygnus.co.uk>
3979
3980         * include/pkgconf/kernel.h:
3981         Changed the kernel package from type bool to type dummy, since
3982         it is not yet possible to disable this package.
3983
3984 1998-09-20  Mark Galassi  <rosalia@cygnus.com>
3985
3986         * include/pkgconf/kernel.h: updated CDL doc strings.
3987         fixed some typos in my doc strings.
3988
3989 1998-09-18  Nick Garnett  <nickg@cygnus.co.uk>
3990
3991         * src/common/thread.cxx: 
3992         * include/thread.inl:
3993         Modified threads list from a LIFO stack to a ring so that we can
3994         add new ones to the end and present the threads to GDB in an order
3995         that more closely matches how it assigns thread ids.
3996         
3997 Wed Sep 16 19:11:22 1998  Hugo Tyson  <hmt@cygnus.co.uk>
3998
3999         * include/thread.inl (get_unique_id): 
4000         Move this declaration to before its first use, so that the user
4001         knows it is inline at the point of use.  Avoids a warning.
4002
4003 Wed Sep 16 08:49:48 1998  Jesper Skov  <jskov@cygnus.co.uk>
4004         PR 17269
4005  
4006         * src/common/except.cxx (Cyg_Exception_Control): Replaced
4007         CYGNUM_EXCEPTION_MAX (bug!) with CYG_EXCEPTION_COUNT.
4008  
4009         * include/kapidata.h (struct cyg_exception_conrol): Replaced
4010         CYG_EXCEPTION_MAX (bug!) with CYG_EXCEPTION_COUNT.
4011  
4012         * src/intr/intr.cxx:
4013         * include/intr.hxx (class Cyg_Interrupt): Replaced CYG_ISR_MAX+1
4014         with CYG_ISR_COUNT.
4015  
4016         * include/except.hxx: Replaced CYGNUM_EXCEPTION_COUNT with
4017         CYG_EXCEPTION_COUNT.
4018  
4019         * tests/kintr0.c: 
4020         * tests/intr0.cxx: Replaced CYG_ISR_MAX (bug!) with
4021         CYG_ISR_COUNT.
4022  
4023 Tue Sep 15 19:19:37 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4024
4025         * include/mboxt2.hxx:
4026         Add inclusion of thread.inl to silence warning
4027
4028         * tests/kexcept1.c:
4029         Insert void as parameter list of __default_exception_vsr() to
4030         silence warning
4031
4032 Tue Sep 15 19:16:52 1998  David Moore  <dsm@keema.cygnus.co.uk>
4033
4034         * src/sched/sched.cxx: Cleaned up comments.
4035
4036 1998-09-15  Nick Garnett  <nickg@cygnus.co.uk>
4037
4038         * src/debug/dbg-thread-demux.c:
4039         Stubbed out led() function.
4040
4041         * src/debug/dbg_gdb.cxx:
4042         Decide whether to byteswap thread id depending on reported byte
4043         order of target.
4044         Many small changes to debug code.
4045
4046         * include/thread.inl (init_context):
4047         Changed CYG_DEBUG to CYGPKG_INFRA_DEBUG.
4048
4049 Tue Sep 15 09:35:14 1998  Jesper Skov  <jskov@cygnus.co.uk>
4050         PR 17236
4051
4052         * src/common/clock.cxx (add_alarm): A retriggering alarm called
4053         with a trigger time in the past or now will be assigned a new
4054         trigger time. Don't find the counter list until the final trigger
4055         time is known.
4056         Also added a few #else error statements to catch a situation where
4057         no CYGIMP_KERNEL_COUNTERS_x_LIST implementation config is
4058         selected.
4059         
4060         * tests/clock0.cxx: Added extra ASSERT to ensure alarms enabled
4061         with a trigger time of now or in the past actually fire.
4062         * tests/kclock0.c: Same.
4063         
4064 1998-09-15  Bart Veer  <bartv@cygnus.co.uk>
4065
4066         * include/pkgconf/kernel.h:
4067         Cleaning up coonfiguration data (mostly improving the
4068         descriptions). 
4069
4070 Mon Sep 14 11:08:59 1998  Jesper Skov  <jskov@lassi.cygnus.co.uk>
4071         PR 17230
4072
4073         * include/pkgconf/kernel.h: CYGIMP_KERNEL_INTERRUPTS_CHAIN
4074         requires CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN.
4075
4076 1998-09-14  Mark Galassi  <rosalia@cygnus.com>
4077
4078         * include/pkgconf/kernel.h: started adding CDL doc fields.
4079
4080 1998-09-12  Bart Veer  <bartv@cygnus.co.uk>
4081
4082         * include/pkgconf/kernel.h: 
4083         Sort out exception handling options (PR 16953)
4084         Added missing descriptions (PR 17184)
4085
4086 Fri Sep 11 19:18:28 1998  Hugo Tyson  <hmt@masala.cygnus.co.uk>
4087
4088         * include/clock.hxx (class Cyg_Alarm): 
4089         * src/common/clock.cxx (Cyg_Alarm::add_alarm): 
4090         PR#17182
4091         Move the code to synchronize a repeating alarm which had been
4092         firing in the dim and distant past with times in the future, which
4093         had been inline in Cyg_Alarm::enable(), into a function of its
4094         own, Cyg_Alarm::synchronize().  Call it from Cyg_Alarm::enable()
4095         and also from add_alarm() when the immediate time to fire is now
4096         or in the past; otherwise an initial time of, say, NOW-10 with an
4097         interval of 5 would just get lost.  Also corrected/commented the
4098         logic there to allow an alarm's handler to cancel itself.
4099         
4100 Wed Sep  9 17:43:26 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4101
4102         * src/common/delete.cxx: 
4103         Control the provision of empty delete functions rather better, via
4104         an explicit option from the libc package.  Read the rather lengthy
4105         comment in delete.cxx for the explanation.
4106         Also note that the correct place for this functionality is in the
4107         infrastructure, and the same should be done for the C++ new
4108         functions also.
4109
4110 1998-09-09  Nick Garnett  <nickg@cygnus.co.uk>
4111
4112         * src/common/thread.cxx:
4113         combined separate next_unique_id variables in both constructors.
4114         This would have caused duplicate thread ids to be generated.
4115
4116         * include/thread.inl:
4117         Added code to initialize Cyg_HardwareThread::saved_context.
4118
4119         * src/debug/dbg-thread-demux.c: 
4120         * src/debug/dbg_gdb.cxx:
4121         Many changes to get thread API working with Cygmon. Debug code
4122         currently left in place until complete testing is possible.
4123
4124 Tue Sep  8 17:17:32 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4125
4126         * include/pkgconf/kernel.h (CYGNUM_KERNEL_COUNTERS_RTC_PERIOD):
4127         Set up a sensible default RTC for CYG_HAL_MN10300_SIM different
4128         from that for the MN103002 or CYG_HAL_MN10300_STDEVAL1, so that
4129         sim tests run in less than geological time.  This is the same as
4130         the default value of before.
4131
4132 Fri Sep  4 18:25:02 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4133
4134         * src/sched/mlqueue.cxx (timeslice): 
4135         * src/sched/sched.cxx (unlock_inner): 
4136         Condition out the tracing macros here by default, for tracing
4137         these consumes the whole quantum.
4138         
4139 1998-09-04  Bart Veer  <bartv@cygnus.co.uk>
4140
4141         * include/pkgconf/kernel.h:
4142         Commented out the ROM monitor-specific option settings for now.
4143         
4144         * tests/kclock1.c: 
4145         * include/pkgconf/kernel.h: 
4146         * include/kapidata.h (struct cyg_counter): 
4147         Fixed typos in configuration option names.
4148         
4149 1998-09-03  David Moore  <dsm@cygnus.co.uk>
4150
4151         * include/pkgconf/kernel.h
4152         (CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE):
4153         Fixed typo in configuration option name.
4154
4155         * src/intr/intr.cxx:
4156         Fixed typo in configuration option name.
4157         Fixed cast to incorrect type.
4158         
4159 1998-09-03  Nick Garnett  <nickg@cygnus.co.uk>
4160
4161         * src/PKGconf.mak (COMPILE): 
4162         Added debug/dbg-thread-demux.c to COMPILE list.
4163         
4164         * src/debug/dbg_gdb.cxx (dbg_threadinfo): 
4165         Added first cut at providing thread state string.
4166         
4167         * src/debug/dbg-thread-syscall.h: 
4168         * src/debug/dbg-thread-demux.c: 
4169         Added these two files to implement the interface between Cygmon
4170         and eCos.
4171         
4172 1998-09-03  Bart Veer  <bartv@cygnus.co.uk>
4173
4174         * include/pkgconf/kernel.h (CYGSEM_KERNEL_MEMORY_COALESCE): 
4175         * include/mvarimpl.inl (Cyg_Mempool_Variable_Implementation): 
4176         Fixed typo in configuration option name.
4177         
4178         * include/pkgconf/kernel.h:
4179         Fixed type in configuration option name.
4180
4181 Wed Sep  2 19:01:02 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4182
4183         * include/mboxt.hxx:
4184         * include/mboxt.inl:
4185         * include/mboxt2.hxx:
4186         * include/mboxt2.inl:
4187         * include/mempolt2.hxx:
4188         * include/mempolt2.inl:
4189         * include/mempoolt.hxx:
4190         * include/mempoolt.inl:
4191         * include/sema2.hxx:
4192         * src/sync/cnt_sem2.cxx:
4193         * include/flag.hxx:
4194         * src/sync/flag.cxx:
4195         * include/kapi.h:
4196         * src/common/kapi.cxx:
4197         * tests/kmbox1.c:
4198         * tests/kmemfix1.c:
4199         * tests/kmemvar1.c:
4200         * tests/mbox1.cxx:
4201         * tests/memfix1.cxx:
4202         * tests/memvar1.cxx:
4203         Memory pool (both types) and message boxes (both types) and flags
4204         and cnt_sem2-type semaphores now all have absolute timeouts
4205         instead of relative ones in the timely wait functions.
4206         uITRON has changed to add the current time itself.
4207         Kapi changes are mainly name changes to make it clear that
4208         timeouts are now absolute.
4209         The tests (incl. kapi) add in the time themselves now.
4210         
4211 1998-09-01  Tim Goodwin  <tgoodwin@cygnus.co.uk>
4212
4213         * include/kapi.h:
4214         * src/common/kapi.cxx:
4215         * tests/kclock1.c:
4216         * tests/kexcept1.c:
4217         * tests/kmbox1.c:
4218         * tests/kmemfix1.c:
4219         * tests/kmemvar1.c:
4220         * tests/kmutex1.c:
4221         * tests/ksched1.c:
4222         * tests/ksem1.c:
4223         * tests/kthread0.c:
4224         * tests/kthread1.c:
4225         * src/test/kcache1.c:
4226         * src/test/kphilo.c:
4227         * tests/kphilo.c:
4228         * tests/lottery.c:
4229         Changes to cyg_thread_create() interface.
4230
4231 Tue Sep  1 18:49:06 1998  Hugo Tyson  <hmt@masala.cygnus.co.uk>
4232
4233         * include/pkgconf/kernel.h: 
4234         Moved and renamed CYG_DIAG_USE_DEVICE to infra and to
4235         CYGDBG_INFRA_DIAG_USE_DEVICE; kernel.h now includes infra.h as
4236         well as hal.h to ensure all its clients get the info too.
4237         
4238         * include/intr.hxx (class Cyg_Interrupt): 
4239         Add static member interrupts_enabled() to poll the current status;
4240         just to avoid calling the HAL directly, really.
4241
4242         * include/diag.h: 
4243         Now just includes cyg/infra/diag.h, so that kernel-specific
4244         features can be added later - original diag.h has moved to infra,
4245         and is that includee.
4246
4247         * src/PKGconf.mak: 
4248         Trace folder and its contents elided, now in infra.
4249
4250         * src/trace/diag.c:
4251         * src/trace/fancy.cxx:
4252         * src/trace/null.cxx:
4253         * src/trace/simple.cxx:
4254         * src/trace/tcdiag.cxx:
4255         Deleted; all moved to infra, actually.
4256
4257 1998-09-01  Nick Garnett  <nickg@cygnus.co.uk>
4258
4259         * src/debug/dbg-threads-api.h: 
4260         * src/debug/dbg_gdb.cxx:
4261         Converted threadref from long long to char[8] as defined by Cygmon
4262         guys.
4263
4264         * src/common/thread.cxx:
4265         Added scheduler lock around manipulations of thread list.
4266
4267         * include/except.hxx:
4268         Now use CYG_EXCEPTION_COUNT to size handler arrays.
4269
4270 Mon Aug 31 17:53:12 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4271
4272         * include/memfixed.hxx, include/mempolt2.hxx, include/mempolt2.inl,
4273           include/mempoolt.hxx, include/mempoolt.inl, include/memvar.hxx,
4274           include/mvarimpl.hxx, include/mvarimpl.inl, src/mem/memfixed.cxx,
4275           src/mem/memvar.cxx:
4276         
4277         Add new get_allocation_size() method to return the size of a
4278         previously allocated block - trivial for fixed block allocator, and
4279         requiring a bit of poking around for the variable block allocator.
4280
4281         This is required for the C library realloc() implementation. Strictly
4282         this only uses the variable block allocator, but the API can only be
4283         enhanced by also updating the template. As a result, this also meant
4284         doing it for the fixed block allocator. 
4285
4286 Mon Aug 31 09:51:37 1998  Jesper Skov  <jskov@cygnus.co.uk>
4287
4288         * src/debug/stubrom.c (cyg_start): Renamed from main().
4289
4290 Mon Aug 31 09:00:01 1998  Jesper Skov  <jskov@cygnus.co.uk>
4291
4292         * src/common/thread.cxx: Fixed typo.
4293
4294 1998-08-28  Bart Veer  <bartv@cygnus.co.uk>
4295
4296         * include/pkgconf/kernel.h, include/bitmap.hxx, include/clock.hxx,
4297           include/except.hxx, include/flag.hxx, include/instrmnt.h,
4298           include/intr.hxx, include/kapi.h, include/kapidata.h,
4299           include/mbox.hxx, include/mboxt.hxx, include/mboxt.inl,
4300           include/mboxt2.hxx, include/mboxt2.inl, include/memfixed.hxx,
4301           include/mempolt2.hxx, include/mempolt2.inl,
4302           include/mempoolt.hxx, include/mempoolt.inl, include/memvar.hxx,
4303           include/mlqueue.hxx, include/mutex.hxx, include/mvarimpl.inl,
4304           include/sched.hxx, include/sema.hxx, include/sema2.hxx,
4305           include/thread.hxx, include/thread.inl,
4306           include/pkgconf/kernel.h:
4307           src/common/clock.cxx, src/common/except.cxx,
4308           src/common/kapi.cxx, src/common/thread.cxx,
4309           src/debug/dbg_gdb.cxx, src/debug/generic-stub.c,
4310           src/instrmnt/meminst.cxx, src/instrmnt/nullinst.cxx,
4311           src/intr/intr.cxx, src/mem/memfixed.cxx, src/mem/memvar.cxx,
4312           src/sched/bitmap.cxx, src/sched/lottery.cxx,
4313           src/sched/mlqueue.cxx, src/sched/sched.cxx,
4314           src/sync/cnt_sem.cxx, src/sync/cnt_sem2.cxx, src/sync/flag.cxx,
4315           src/sync/mbox.cxx, src/sync/mutex.cxx, src/test/diag.cxx,
4316           src/test/kcache1.c, src/test/main.cxx, src/test/timer.cxx,
4317           src/test/tstmbox.cxx:
4318           tests/clock0.cxx, tests/clock1.cxx, tests/except1.cxx,
4319           tests/flag1.cxx, tests/intr0.cxx, tests/kclock0.c,
4320           tests/kclock1.c, tests/kexcept1.c, tests/kintr0.c,
4321           tests/kmbox1.c, tests/kmemfix1.c, tests/kmemvar1.c,
4322           tests/kmutex0.c, tests/kmutex1.c, tests/ksched1.c,
4323           tests/ksem0.c, tests/ksem1.c, tests/kthread0.c,
4324           tests/kthread1.c, tests/lottery.c, tests/mbox1.cxx,
4325           tests/memfix1.cxx, tests/memvar1.cxx, tests/sync3.cxx,
4326           tests/thread2.cxx :
4327         Provide configuration data and rename configuration options
4328
4329 Fri Aug 28 15:27:31 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4330
4331         * src/trace/fancy.cxx: 
4332         * src/trace/simple.cxx: 
4333         * src/trace/null.cxx: 
4334         Condition on newly named symbols from the infra package, whence
4335         these units will be moved soon.
4336         
4337 Fri Aug 28 09:33:17 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4338
4339         * src/test/demo.cxx, src/test/kcache1.c, src/test/kphilo.c,
4340           src/test/main.cxx, src/test/philo.cxx, src/test/sload.c,
4341           src/test/timer.cxx, src/test/tstflag.cxx, src/test/tstmbox.cxx,
4342           src/test/tstmpf.cxx, src/test/tstmpool.cxx, src/test/tsttracc.c,
4343           src/test/tsttrace.cxx, tests/bin_sem0.cxx, tests/bin_sem1.cxx,
4344           tests/bin_sem2.cxx, tests/clock0.cxx, tests/clock1.cxx,
4345           tests/cnt_sem0.cxx, tests/cnt_sem1.cxx, tests/except1.cxx,
4346           tests/flag0.cxx, tests/flag1.cxx, tests/intr0.cxx, tests/kclock0.c,
4347           tests/kclock1.c, tests/kexcept1.c, tests/kill.cxx, tests/kintr0.c,
4348           tests/kmbox1.c, tests/kmemfix1.c, tests/kmemvar1.c, tests/kmutex0.c,
4349           tests/kmutex1.c, tests/kphilo.c, tests/ksched1.c, tests/ksem0.c,
4350           tests/ksem1.c, tests/kthread0.c, tests/kthread1.c, tests/lottery.c,
4351           tests/mbox1.cxx, tests/memfix1.cxx, tests/memfix2.cxx,
4352           tests/memvar1.cxx, tests/memvar2.cxx, tests/mutex0.cxx,
4353           tests/mutex1.cxx, tests/philo.cxx, tests/release.cxx,
4354           tests/sched1.cxx, tests/sync2.cxx, tests/sync3.cxx,
4355           tests/thread0.cxx, tests/thread1.cxx, tests/thread2.cxx:
4356         Change entry points from main() to cyg_start(), and remove return
4357         codes - while main returned an int, cyg_start() returns void. It has
4358         no meaning anyway - what could you do with the code?
4359
4360         * src/test/tsttracc.c, src/test/tsttrace.cxx:
4361         Also change trace calls (CYG_REPORT_...) to reflect that it is a
4362         function called cyg_start with no args returning void, rather than
4363         what it was for main(argc, argv)
4364
4365 Fri Aug 28 09:24:41 1998  Jesper Skov  <jskov@cygnus.co.uk>
4366
4367         * src/debug/generic-stub.c: Moved strcpy/strlen from hal-stub to
4368         generic-stub. Cleaned up a bit to avoid compiler warnings.
4369
4370 Thu Aug 27 19:22:51 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4371
4372         * tests/kphilo.c (Philosopher): 
4373         * tests/philo.cxx (Philosopher): 
4374         * src/test/philo.cxx (Philosopher): 
4375         * src/test/kphilo.c (Philosopher): 
4376         * src/common/kapi.cxx: 
4377         Change CYG_RELEASE_DEBUG to CYGPKG_INFRA_DEBUG.
4378         These changes are self-contained, so they can go in right now.
4379         
4380 Thu Aug 27 15:20:31 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4381
4382         * include/mvarimpl.inl (free): 
4383         Remove a couple of warning due to pointer comparison without casts
4384         in coallesce(sic.) code.
4385
4386 1998-08-26  Nick Garnett  <nickg@cygnus.co.uk>
4387
4388         * include/kapidata.h:
4389         Added saved_context to cyg_hardwarethread structure to track
4390         GDB support in rest of kernel.
4391
4392 1998-08-25  Nick Garnett  <nickg@cygnus.co.uk>
4393
4394         * include/pkgconf/kernel.h:
4395         Added CYGIMP_KERNEL_THREAD_GDB_SUPPORT to configure for GDB
4396         interactions with the kernel.
4397
4398         * src/debug/dbg-threads-api.h: 
4399         * src/debug/dbg_gdb.cxx:
4400         Added these files to repository to support GDB interactions
4401         with the kernel. Note that dbg-threads-api.h is a copy of a
4402         file in devo/libstub. Any changes there must be merged in here
4403         too.
4404
4405         * src/PKGconf.mak:
4406         Added debug/dbg_gdb.cxx to COMPILE list.
4407
4408         * include/thread.inl: 
4409         * include/thread.hxx:
4410         Added support for GDB, specifically for thread-aware debugging.
4411
4412         * include/intr.hxx:
4413         * src/intr/intr.cxx:
4414         Added an extra argument to interrupt_end(): a pointer to
4415         the saved register state. This is optionally used to provide
4416         a more interesting saved register state for GDB.
4417
4418 Tue Aug 25 02:36:26 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4419
4420         * include/generic-stub.h: 
4421         Add void to empty prototype argument lists to silence compiler
4422         warnings
4423
4424 Fri Aug 21 18:46:34 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4425
4426         * src/common/clock.cxx (enable): 
4427         Make the maths work right if we only just set up the clock
4428         thingy.  Unsigned has a lot to answer for; when the next scheduled
4429         tick was all correct, the delta was -1, which correctly rounds to
4430         zero in the division.  But it isn't -1 it's 18446744073709551615
4431         which gave a shift of 15 in the the uITRON test programs.
4432
4433 Fri Aug 21 11:40:50 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4434
4435         * include/mboxt2.inl (put): 
4436         * include/mempolt2.inl (alloc): 
4437         Tidy Nick's changes (1998-07-27) for set_timer() semantics a bit,
4438         make it a bit more efficient and smaller code.
4439         
4440 Thu Aug 20 17:37:35 BST 1998  Chris Provenzano  <proven@cygnus.com>
4441
4442         * include/mvarimpl.inl, include/pkgconf/kernel.h:
4443         Added memory coallecsing to the variable size memory allocator.
4444         This option is enabled my default.
4445
4446         * tests/stdlib/malloc2.c: Only print 50 messages, not 500.
4447
4448 1998-08-20  Nick Garnett  <nickg@cygnus.co.uk>
4449
4450         * include/pkgconf/kernel.h:
4451         Moved definition of CYG_KERNEL_USE_INIT_PRIORITY from here
4452         to hal.h.
4453
4454         * include/thread.hxx:
4455         Changed argument to cyg_thread_entry() to CYG_ADDRWORD from
4456         CYG_ADDRESS.
4457
4458         * include/ktypes.h:
4459         Moved constructor priority ordering stuff out to infra/cyg_type.h.
4460
4461         * include/kapi.h: 
4462         * src/common/kapi.cxx:
4463         Added name and priority parameters to cyg_thread_create() and
4464         swapped stack size and base parameters. These changes are
4465         currently protected by DAY_OF_CHAOS ifdefs and are therefore
4466         inactive.
4467
4468 Wed Aug 19 19:06:16 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4469
4470         * tests/bin_sem1.cxx, tests/bin_sem2.cxx, tests/cnt_sem1.cxx,
4471           tests/flag1.cxx, tests/mbox1.cxx, tests/memfix2.cxx,
4472           tests/memvar2.cxx, tests/sync2.cxx, tests/sync3.cxx,
4473           tests/thread2.cxx, tests/release.cxx, tests/kill.cxx: 
4474         Reorder inclusion of thread.inl to silence warnings
4475
4476 Wed Aug 19 18:48:03 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4477
4478         * include/kernel.hxx: 
4479         Reorder inclusion of thread.inl to silence warnings
4480
4481 Wed Aug 19 18:21:31 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4482
4483         * src/common/kapi.cxx, src/sync/flag.cxx: 
4484         Reorder inclusion of thread.inl to silence warnings
4485
4486         * src/sync/bin_sem.cxx, src/sync/cnt_sem.cxx, src/sync/cnt_sem2.cxx,
4487           src/sync/mbox.cxx:
4488         Add inclusion of thread.inl to silence warnings
4489
4490         * src/common/memset.c:
4491         Make pointer arithmetic be on char *, not void * to silence warnings
4492
4493         * include/diag.h, src/trace/diag.c:
4494         Make diag_init take void parameter, and give diag_printf explicit
4495         parameters in prototypes to silence warnings
4496
4497 1998-08-19  Nick Garnett  <nickg@cygnus.co.uk>
4498
4499         * include/pkgconf/kernel.h: 
4500         * src/common/thread.cxx:
4501         Added ifdef for CYGIMP_IDLE_THREAD_YIELD to support single
4502         priority configurations.
4503
4504 Tue Aug 18 16:56:38 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4505
4506         * include/thread.hxx, include/thread.inl: 
4507         To silence compiler warnings, move register_exception inline definition
4508         from the .hxx to the .inl. Also move attach_stack to before the
4509         constructor where it is invoked from.
4510
4511 1998-08-18  Nick Garnett  <nickg@cygnus.co.uk>
4512
4513         * include/pkgconf/kernel.h:
4514         Moved all HAL specific config options out to a HAL config file.
4515
4516         * include/kapi.h: 
4517         * src/common/kapi.cxx:
4518         Added cyg_scheduler_lock() and cyg_scheduler_unlock() to provide
4519         user access to the scheduler lock.
4520
4521 Mon Aug 17 21:39:20 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4522
4523         * include/kapi.h: 
4524         Insert "void" to empty parameter lists to silence warnings
4525
4526 Fri Aug 14 18:10:20 1998  Hugo Tyson  <hmt@masala.cygnus.co.uk>
4527
4528         * src/common/thread.cxx (exit): 
4529         Set the state explicitly to EXITED rather than or'ing
4530         it in; should be safe cos it's what kill does in the normal case.
4531         Needed to avoid suspend sort of states persisting after death.
4532         One character changes are always aesthetically pleasing.
4533
4534 Fri Aug 14 17:28:01 1998  Hugo Tyson  <hmt@cygnus.co.uk>
4535
4536         * include/pkgconf/kernel.h: 
4537         Add config options as below:
4538
4539         * src/common/thread.cxx:
4540         Add asserts of CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT
4541         and CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT if they are defined.
4542         Also lazily tidied format of func hdrs as per code review et al.
4543
4544 1998-08-14  Nick Garnett  <nickg@cygnus.co.uk>
4545
4546         * include/kapidata.h:
4547         Added support for thread names and thread housekeeping list.
4548
4549         * src/common/delete.cxx:
4550         Added include for cyg_type.h.
4551
4552         * include/pkgconf/kernel.h:
4553         Added CYGIMP_THREAD_NAME and CYGIMP_THREAD_LIST options.
4554
4555         * include/thread.inl: 
4556         * include/thread.hxx:
4557         Added support for thread names and thread housekeeping list.
4558
4559         * src/common/thread.cxx:
4560         Added support for thread names and thread housekeeping list.
4561         Fixed ordering bug in Cyg_Thread::delay().
4562
4563 Thu Aug 13 15:33:48 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4564
4565         * include/ktypes.h:
4566         Remove inlined new and delete as they aren't strictly permitted and
4567         they prevent a valid new and delete being defined anywhere else!
4568         
4569         * src/common/delete.cxx, src/PKGconf.mak: 
4570         Add delete.cxx to provide default delete operation for when a C
4571         library isn't present
4572
4573 1998-07-28  Nick Garnett  <nickg@cygnus.co.uk>
4574
4575         * include/thread.hxx, include/sched.hxx, include/mlqueue.hxx,
4576           include/lottery.hxx, include/bitmap.hxx, src/common/thread.cxx,
4577           src/sched/sched.cxx, src/sched/mlqueue.cxx, src/sched/lottery.cxx,
4578           src/sched/bitmap.cxx:
4579         Added an alternative constructor to Cyg_Thread which takes
4580         arguments in new order, and includes a scheduling parameters
4581         argument. Propagated effects of this through Cyg_SchedThread
4582         and Cyg_SchedThread_Implementation. This mostly takes the form
4583         of passing the scheduling parameters through to the constructors.
4584
4585 1998-07-27  Nick Garnett  <nickg@cygnus.co.uk>
4586
4587         * src/sync/flag.cxx, src/sync/cnt_sem2.cxx, include/mempoolt.inl,
4588           include/mempolt2.inl, include/mboxt2.inl, include/mboxt.inl:
4589         Modified code in API calls that take a timeout to allow for a
4590         timeout in the past.
4591         NOTE: The timeouts have for now been left as relative delays, they
4592         should be converted to absolute timeouts.
4593
4594         * src/common/thread.cxx:
4595         Modified code in counted_sleep to allow for a timeout in the past.
4596         Added handling of EXIT wake_reason in delay().
4597
4598 1998-07-24  Nick Garnett  <nickg@cygnus.co.uk>
4599
4600         * include/thread.inl:
4601         Reordered code in Cyg_Thread::set_timer() to init the timer after
4602         wake_reason has been assigned.
4603
4604         * include/clock.inl: 
4605         Removed Cyg_Alarm::enable().
4606         
4607         * src/sync/mutex.cxx (Cyg_Condition_Variable::wait): 
4608         Modified order of code in timed version of wait to allow for a
4609         timout in the past.
4610         
4611         * src/sync/cnt_sem.cxx (Cyg_Counting_Semaphore::wait):
4612         Modified order of code in timed version of wait to allow for a
4613         timout in the past. Also modified timeout to be absolute rather
4614         than relative.
4615
4616         * src/common/thread.cxx (Cyg_Thread::wake):
4617         Added test for whether a thread is actually asleep before waking
4618         it. Allows us to apply wake() to awake threads without damage.
4619
4620         * src/common/clock.cxx:
4621         Added code to Cyg_Counter::add_alarm() to deal with alarms
4622         that trigger now or in the past.
4623         Moved Cyg_Alarm::enable() here. Added code to do the right thing
4624         when reenabling previously disabled interval alarms.
4625
4626 1998-07-23  Nick Garnett  <nickg@cygnus.co.uk>
4627
4628         * src/debug/stubrom.c: Added header comments.
4629
4630 Thu Mar 26 18:25:36 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4631
4632         * src/test/philo.cxx:
4633         Rename CYG_DEBUG ifdef to CYG_RELEASE_DEBUG
4634
4635 Wed Mar 25 23:23:39 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4636
4637         * configure.in: Fix so non_arch.h is updated even if
4638         config.cache does exists.
4639
4640         * include/kapi.h, include/kapidata.h, include/kernel.hxx
4641         * include/mboxt.inl, include/sched.hxx:
4642         #include <eccconf/kernel.h> instead of include <eccconf/kernel.h>
4643
4644         * include/eccconf/kernel.h: Added. This was old devo/config.h
4645
4646         * src/Makefile.am : Set CYG_CONFIGURATION to "<eccconf/kernel.h>"
4647
4648         * src/test/Makefile.am : Build .gdbinit from gdbinit.in
4649         and tree from tree.in
4650
4651 Wed Mar 25 18:24:48 1998  Jonathan Larmour  <jlarmour@cygnus.co.uk>
4652
4653         * src/Makefile.am, src/common/memcpy.c, src/common/memset.c:
4654           Move memcpy and memset functions from C library into kernel to
4655           satisfy the requirements of gcc - namely it must be available at
4656           at all time. Changed memcpy and memset to sit more cleanly in the
4657           kernel, and lose all dependencies on the C library
4658         * src/Makefile.in: regenerated
4659
4660 Fri Mar 13 18:36:42 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4661
4662         * configure.in : Add rule to get correct objcopy for target
4663         * src/test/Makefile.am : Add rule to build philo.srec
4664
4665 Fri Mar 13 11:47:23 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4666
4667         * configure.in, non_arch.h.in, non_arch.sh
4668         Add support for the mn103000
4669
4670 Thu Mar 12 11:38:28 GMT 1998  David Moore       <dsm@cygnus.co.uk>
4671
4672         * src/Makefile.am:
4673         Removed flag to leave comments in generated linker script.
4674        
4675 Thu Mar 12 10:55:20 GMT 1998  David Moore       <dsm@cygnus.co.uk>
4676
4677         * configure.in:
4678         Fixed setting of platform variable
4679
4680 Wed Mar 11 16:54:28 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4681
4682         * src/test/Makefile.am, tests/Makefile.am:
4683         Make sure CXXFLAGS from configure are also used
4684
4685 Wed Mar 11 16:16:57 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4686
4687         * configure.in, non_arch.h.in. non_arch.sh:
4688         Added build support for mips 
4689         * tests/Makefile.am, src/test/Makefile.am
4690         Link with -nostdlib -lgcc
4691
4692 Wed Mar 11 14:43:36 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4693
4694         * Makefile.am, configure.in, tests/Makefile.am
4695         support building tests in the tests directory
4696
4697 Wed Mar 11 13:18:17 GMT 1998  Chris Provenzano  <proven@cygnus.com>
4698
4699         * acinclude.m4, stamp-h.in, non_arch.h.in, src/Makefile.am:
4700         Added to support new kernel configure/make process
4701
4702         * Makefile.am: Modified to support new kernel configure/make 
4703         process.
4704
4705         * src/acinclude.m4, src/aclocal.m4, src/configure, src/configure.in
4706         Deleted to support new kernel configure/make process
4707
4708         * Makefile.in, configure, aclocal.m4, src/Makefile.in, 
4709         src/configure: regenerated
4710
4711         * non_arch.sh: New shellscript to change platform/startup/debug
4712         options after a configure is done.
4713
4714         * src/devo/config.h: include non_arch.h, for platform/startup/debug
4715         options. This is generated at configure and modified by non_arch.sh
4716
4717 //===========================================================================
4718 //####ECOSGPLCOPYRIGHTBEGIN####
4719 // -------------------------------------------
4720 // This file is part of eCos, the Embedded Configurable Operating System.
4721 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
4722 //
4723 // eCos is free software; you can redistribute it and/or modify it under
4724 // the terms of the GNU General Public License as published by the Free
4725 // Software Foundation; either version 2 or (at your option) any later version.
4726 //
4727 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
4728 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
4729 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4730 // for more details.
4731 //
4732 // You should have received a copy of the GNU General Public License along
4733 // with eCos; if not, write to the Free Software Foundation, Inc.,
4734 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
4735 //
4736 // As a special exception, if other files instantiate templates or use macros
4737 // or inline functions from this file, or you compile this file and link it
4738 // with other works to produce a work based on this file, this file does not
4739 // by itself cause the resulting work to be covered by the GNU General Public
4740 // License. However the source code for this file must still be made available
4741 // in accordance with section (3) of the GNU General Public License.
4742 //
4743 // This exception does not invalidate any other reasons why a work based on
4744 // this file might be covered by the GNU General Public License.
4745 //
4746 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
4747 // at http://sources.redhat.com/ecos/ecos-license/
4748 // -------------------------------------------
4749 //####ECOSGPLCOPYRIGHTEND####
4750 //===========================================================================