Mercurial > ecos
comparison packages/kernel/current/ChangeLog @ 177:4c750ce71ae3
Merge from eCos master repository on 2001-08-10-19:22:57-BST
| author | jlarmour |
|---|---|
| date | Fri, 10 Aug 2001 19:27:55 +0000 |
| parents | 38892b97b685 |
| children | aa8364213009 |
comparison
equal
deleted
inserted
replaced
| 176:3902ef905c9c | 177:4c750ce71ae3 |
|---|---|
| 1 2001-08-06 Hugo Tyson <hmt@redhat.com> | |
| 2 | |
| 3 * src/sched/sched.cxx (unlock_inner): Fix assignment to current, | |
| 4 wouldn't build if stack checking after merger from SMP branch. | |
| 5 | |
| 6 2001-08-06 Andrew Lunn <andrew.lunn@ascom.ch> | |
| 7 2001-08-06 Hugo Tyson <hmt@redhat.com> | |
| 8 | |
| 9 * src/sync/mutex.cxx: (set_protocol) Added a function to set the | |
| 10 priority inversion protocol for a mutex. | |
| 11 | |
| 12 * src/common/kapi.cxx: Export the new function above and | |
| 13 set_ceiling into the C API. | |
| 14 | |
| 15 * include/mutex.hxx (class Cyg_Mutex): New member function | |
| 16 set_protocol(). | |
| 17 | |
| 18 * include/kapi.h (cyg_protcol): Define new emumeration for mutex | |
| 19 priority protocol setting, and headers for the new function to set | |
| 20 it. | |
| 21 | |
| 22 2001-08-03 Nick Garnett <nickg@redhat.com> | |
| 23 | |
| 24 Imported from a development branch: | |
| 25 | |
| 26 2001-07-11 Nick Garnett <nickg@redhat.com> | |
| 27 | |
| 28 * src/sched/mlqueue.cxx: Changed behaviour of | |
| 29 set_need_reschedule() to a better implementation of the intended | |
| 30 algorithm. | |
| 31 | |
| 32 * include/kapi.h: | |
| 33 * src/common/kapi.cxx: | |
| 34 Added API for controlling routing of interrupts to CPUs in SMP | |
| 35 configurations. | |
| 36 | |
| 37 2001-07-03 Nick Garnett <nickg@cygnus.co.uk> | |
| 38 | |
| 39 * cdl/scheduler.cdl: | |
| 40 * include/bitmap.hxx: | |
| 41 * src/sched/bitmap.cxx: | |
| 42 Fixed up bitmap scheduler so it still works within the | |
| 43 SMP-modified scheduling infrastructure. The bitmap scheduler | |
| 44 is not currently SMP-enabled, only single CPU configurations are | |
| 45 supported - hence the CDL change to require this. | |
| 46 | |
| 47 2001-06-29 Nick Garnett <nickg@cygnus.co.uk> | |
| 48 | |
| 49 * src/sched/sched.cxx: | |
| 50 Removed the call to Cyg_Interrupt::enable_interrupts() in | |
| 51 Cyg_Scheduler::start_cpu(). This was a relic from the days when | |
| 52 the interrupt enable state was not part of the thread state. Now | |
| 53 it is, and loading the first thread will cause interrupts to be | |
| 54 enabled. | |
| 55 | |
| 56 * src/intr/intr.cxx: | |
| 57 Changed initial values of Cyg_Interrupt::disable_counter[]s to | |
| 58 zero as a result of the change in Cyg_Scheduler::start_cpu(). | |
| 59 | |
| 60 * include/kapi.h: | |
| 61 * include/kapidata.h: | |
| 62 * src/common/kapi.cxx: | |
| 63 Added API for using spinlocks. Largely so that it may be extended | |
| 64 to the driver API. | |
| 65 | |
| 66 * include/mlqueue.hxx: | |
| 67 * include/intr.hxx: | |
| 68 * include/sched.hxx: | |
| 69 Added annotations to various static variables. | |
| 70 | |
| 71 2001-06-28 Nick Garnett <nickg@cygnus.co.uk> | |
| 72 | |
| 73 * include/intr.hxx: | |
| 74 * src/intr/intr.cxx: | |
| 75 Changed behaviour of Cyg_Interrupt::disable_interrupts() and | |
| 76 Cyg_Interrupt::enable_interrupts(). These now claim and release a | |
| 77 spinlock in addition to disabling and enabling interrupts. The | |
| 78 original interrupt state is also preserved and restored. This is | |
| 79 necessary in SMP systems to allow drivers etc. to correctly | |
| 80 synchronize with threads and DSRs that may be running on different | |
| 81 CPUs. In the single CPU case this mechanism reduces to the | |
| 82 original simple interrupt disable code. | |
| 83 [Later change] Backed off addition of volatile modifier to | |
| 84 interrupt_disable_state. | |
| 85 | |
| 86 * include/smp.hxx: Some minor tidies. | |
| 87 | |
| 88 2001-06-27 Nick Garnett <nickg@cygnus.co.uk> | |
| 89 | |
| 90 * tests/release.cxx: Added spin loop in thread1 to allow thread0 | |
| 91 to execute its wait. This is necessary in SMP systems where the | |
| 92 threads will execute in parallel, but is also benign in single CPU | |
| 93 systems. | |
| 94 | |
| 95 * tests/mutex2.cxx: | |
| 96 * tests/mutex3.cxx: | |
| 97 * tests/sync3.cxx: | |
| 98 * tests/thread2.cxx: | |
| 99 These tests depend on predicting the behaviour of threads at | |
| 100 different priorities to pass. In an SMP system, several threads | |
| 101 will run in parallel, and the execution order will not be as | |
| 102 expected. These tests are therefore disabled in SMP | |
| 103 configurations. | |
| 104 | |
| 105 * src/sched/mlqueue.cxx (add_thread): Moved call to | |
| 106 set_need_reschedule() out of test for empty queue. In SMP systems, | |
| 107 any addition to a queue may require a reschedule on another CPU. | |
| 108 | |
| 109 2001-06-22 Nick Garnett <nickg@cygnus.co.uk> | |
| 110 | |
| 111 * include/mlqueue.hxx: | |
| 112 * src/sched/mlqueue.cxx: | |
| 113 A major change to the way in which this scheduler works in SMP | |
| 114 systems. The previous version removed all runnable threads from | |
| 115 the run queues when they were executing. This resulted in serious | |
| 116 complications and messy code, particularly when dealing with | |
| 117 priority changes and timeslicing. The new version keeps running | |
| 118 threads in the run queues, just like the single-CPU version. The | |
| 119 main disadvantage of this is that we may have to search past | |
| 120 threads running on other CPUs before we find one available to run | |
| 121 on this CPU. However, the pending count array and map mean that we | |
| 122 only need search one run queue, and in any case the search remains | |
| 123 bounded by the number of CPUs available. | |
| 124 Another change is in the way that timeslicing is handled. Now, the | |
| 125 CPU that takes the clock interrupt decrements the timeslice counts | |
| 126 for all CPUs and if any go zero, sends a TIMESLICE message to | |
| 127 that CPU. | |
| 128 | |
| 129 * src/sched/sched.cxx (unlock_inner): | |
| 130 Removed call to requeue(), no longer needed as a result of | |
| 131 scheduler reorganization. | |
| 132 | |
| 133 * src/common/thread.cxx: | |
| 134 Added test in Cyg_Thread::exit() to check that the thread has not | |
| 135 already been killed. This is only an issue if the thread is | |
| 136 calling exit() when it is kill()ed from another CPU. The test is | |
| 137 redundant in single-CPU systems, but it does no harm having it. | |
| 138 Added code to Cyg_Thread::set_priority() to check for reschedule | |
| 139 when another thread is being changed in priority. | |
| 140 Added call in idle thread constructor to scheduler to install the | |
| 141 idle thread as the default current thread for a CPU. | |
| 142 | |
| 143 * include/smp.hxx: | |
| 144 Added CYG_KERNEL_CPU_TIMESLICE_INTERRUPT(), did some miscellaneous | |
| 145 tidying. | |
| 146 | |
| 147 * include/instrmnt.h: Added SMP_RESCHED_SEND and SMP_RESCHED_RECV | |
| 148 events. | |
| 149 | |
| 150 * cdl/kernel.cdl: Added smp test program. | |
| 151 | |
| 152 * tests/smp.cxx: Added this program to test SMP functionality. | |
| 153 | |
| 154 2001-06-13 Nick Garnett <nickg@cygnus.co.uk> | |
| 155 | |
| 156 * src/sched/sched.cxx: | |
| 157 Removed code to set up initial current thread, this is now done | |
| 158 in the idle thread constructor. | |
| 159 Added code here to set up interrupts for SMP inter-processor | |
| 160 interrupts. This is not very tidy and may need to be | |
| 161 changed in the future. | |
| 162 | |
| 163 * src/sched/mlqueue.cxx: | |
| 164 Added local set_need_reschedule() function to set the | |
| 165 need_reschedule flag on a suitable CPU. | |
| 166 Many more changes to cope with SMP systems. | |
| 167 NOTE: This code has all become somthing of a mess, it need to be | |
| 168 tidied up and the SMP-specific changes integrated better into the | |
| 169 code. Also, timesliceing currently only works on the CPU that | |
| 170 takes clock interrupts - this needs fixing. | |
| 171 | |
| 172 * src/common/thread.cxx: | |
| 173 Moved assignment of initial current thread to here from sched.cxx. | |
| 174 | |
| 175 * include/smp.hxx: | |
| 176 Changed CYG_KERNEL_CPU_INTERRUPT() | |
| 177 CYG_KERNEL_CPU_RESCHEDULE_INTERRUPT() since there may be other | |
| 178 interrupt types to worry about. | |
| 179 Added annotations to scheduler data items. | |
| 180 | |
| 181 * include/sched.hxx: | |
| 182 Split set_current_thread() into two functions, the original works | |
| 183 only on the current CPU, the new one sets another CPU's current | |
| 184 thread. This latter function is only used to prime the current | |
| 185 threads during initialization. | |
| 186 Added second need_reschedule() function that takes a thread | |
| 187 argument. This is intended to be overridden by a scheduler | |
| 188 specific function that sets the need_reschedule flag if the | |
| 189 supplied thread is more deserving of CPU time that any current | |
| 190 thread. | |
| 191 | |
| 192 * include/mlqueue.hxx: | |
| 193 Made cyg_scheduler_set_need_reschedule() a friend of | |
| 194 Cyg_Scheduler_Implementation class. | |
| 195 Added override set_need_reschedule() functions. | |
| 196 | |
| 197 * include/kapidata.h: Added cpu field to cyg_thread structure when | |
| 198 in SMP systems. | |
| 199 | |
| 200 * include/intr.hxx: | |
| 201 * src/intr/intr.cxx: | |
| 202 Added Cyg_Interrupt::set_cpu() and Cyg_Interrupt::get_cpu() for | |
| 203 SMP systems. | |
| 204 | |
| 205 * include/instrmnt.h: Added events for INTR_GET_CPU and | |
| 206 INTR_SET_CPU. | |
| 207 | |
| 208 2001-05-29 Nick Garnett <nickg@cygnus.co.uk> | |
| 209 | |
| 210 The following changes were all imported from the SMP branch: | |
| 211 | |
| 212 * tests/tm_basic.cxx: | |
| 213 Modified to work in SMP configuration - mostly at present by | |
| 214 ifdeffing out code I didn't want to fix. | |
| 215 | |
| 216 * include/sched.hxx: | |
| 217 Moved scheduler lock operation into Cyg_Scheduler_SchedLock class. | |
| 218 Converted current_thread, need_reschedule, and thread_switches | |
| 219 into CPU indexed arrays. Added member functions to get and set | |
| 220 these indirectly. | |
| 221 Added start_cpu() to do per-CPU scheduler startup. | |
| 222 | |
| 223 * include/sched.inl: | |
| 224 Converted scheduler lock/unlock functions to use new schedlock | |
| 225 class. | |
| 226 | |
| 227 * src/sched/sched.cxx: | |
| 228 Changed in line with sched.hxx. | |
| 229 Added call to requeue() in unlock_inner() to restore current | |
| 230 thread to run queue if necessary. | |
| 231 Moved most of scheduler startup to Cyg_Scheduler::start_cpu(). | |
| 232 Cyg_Scheduler::start() now also starts secondary CPUs in SMP | |
| 233 systems. | |
| 234 Added cyg_kernel_smp_startup() as entry point from HAL into kernel | |
| 235 for secondary CPUs. | |
| 236 | |
| 237 * include/mlqueue.hxx: | |
| 238 Added Cyg_RunQueue type and removed | |
| 239 Cyg_SchedulerThreadQueue_Implementation type. | |
| 240 Converted timeslice_count to CPU indexed array. | |
| 241 Added requeue() member function to scheduler class. | |
| 242 Added cpu member to thread implementation class, to record | |
| 243 thread's current CPU. | |
| 244 | |
| 245 * src/sched/mlqueue.cxx: | |
| 246 Changed behaviour when in SMP system to remove scheduled thread | |
| 247 from run queue and replace it when preempted. | |
| 248 Added some extra asserts, and removed some that are no longer true | |
| 249 in an SMP system. | |
| 250 | |
| 251 * src/instrmnt/meminst.cxx: In SMP systems: added spinlock to | |
| 252 protect instrument buffer, added CPU Id in top 4 bits of thread Id | |
| 253 field. | |
| 254 | |
| 255 * src/common/thread.cxx: | |
| 256 Converted to use accessor functions for need_reschedule and | |
| 257 current_thread. | |
| 258 Rearranged idle thread creation to create one for each CPU. | |
| 259 | |
| 260 * include/test/stackmon.h: Extended to handle stack usage for | |
| 261 multiple idle threads. | |
| 262 | |
| 263 * include/thread.inl: | |
| 264 Added some extra instrumentation. | |
| 265 | |
| 266 * include/smp.hxx: | |
| 267 Added this file to contain all kernel SMP support. The main | |
| 268 definitions exported by this file are spin lock and scheduler lock | |
| 269 implementation classes, for both SMP and uniprocessor | |
| 270 configurations. | |
| 271 | |
| 272 * src/intr/intr.cxx: | |
| 273 * include/intr.hxx: | |
| 274 Converted interrupt disable counter to CPU indexed array. In | |
| 275 intr.cxx: added lock of scheduler lock in interrupt_end() rather | |
| 276 than in default interrupt VSR. | |
| 277 | |
| 278 * cdl/kernel.cdl: Added option to enable SMP support. | |
| 279 | |
| 280 * include/instrmnt.h: | |
| 281 * cdl/instrument.cdl: Added SMP instrumentation. | |
| 282 | |
| 283 2001-05-25 Nick Garnett <nickg@cygnus.co.uk> | |
| 284 | |
| 285 * include/intr.hxx: | |
| 286 * src/intr/intr.cxx: | |
| 287 Added default definition of CYGNUM_HAL_ISR_TABLE_SIZE. This is now | |
| 288 used to declare the chain table so that architectures which have | |
| 289 different sizes for the interrupt table and vector count will work | |
| 290 correctly. | |
| 291 | |
| 292 2001-05-22 Nick Garnett <nickg@cygnus.co.uk> | |
| 293 | |
| 294 * include/sched.hxx (class Cyg_Scheduler_Base): | |
| 295 Added annotation to sched_lock. | |
| 296 | |
| 297 * cdl/instrument.cdl: | |
| 298 Rename CYGNUM_KERNEL_INSTRUMENT_BUFFER_WRAP to | |
| 299 CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP as it appears in the code. | |
| 300 | |
| 1 2001-07-27 Jesper Skov <jskov@redhat.com> | 301 2001-07-27 Jesper Skov <jskov@redhat.com> |
| 2 | 302 |
| 3 * src/intr/intr.cxx (chain_isr): Return isr_ret so caller (which | 303 * src/intr/intr.cxx (chain_isr): Return isr_ret so caller (which |
| 4 may be an arbiter) can tell if the interrupt was handled. | 304 may be an arbiter) can tell if the interrupt was handled. |
| 5 | 305 |
