Lejin Joy(disabled)
|
Solutions for the Webinar Questions on QNX Microkernel
|
Lejin Joy(disabled)
10/18/2007 3:15 AM
post2089
|
Solutions for the Webinar Questions on QNX Microkernel
1) What does STI expand to in the MIPS kernel?
STI is the function implimented for setting or enabling the interrupts in the kernel.It stands for Set Interrupt. STI
and CLI are used for setting and clearing the Interrupts.
Reference Source : /services/system/ker/mips/kernel.S
2) Where is queued_event_priority set?
The "queued_event_priority" flag used in kermacros.h file at /system/ker/
#if !defined(__PPC__) && (defined(WANT_SMP_MACROS) || defined(VARIANT_smp))
//NYI: Kludge - PPC code should be updated to handle need_to_run
#define NEED_PREEMPT(act) (((act)->priority < queued_event_priority) || need_to_run)
#else
#define NEED_PREEMPT(act) ((act)->priority < queued_event_priority)
#endif
This flag is defined in externs.h file at /system/ker/
// Interrupt path globals
EXT volatile unsigned char c;
This flag is set in the nano_event.c file in /system/ker/
if(queued_event_priority < prio) {
queued_event_priority = prio; } // in the intrevent_add()
queued_event_priority = 0; // in the intrevent_drain()
3) In the memmgr message handler, what is the purpose of proc_wlock_adp(prp);
This is used to obtain or reobtain write lock for the memory address space of the process, given as a pointer argument
before locking any object to avoid deadlocks, memory protection and mutual exclusion. This is defined in /services/
system/memmgr/memmgr_support.c file. This write lock function is used by memmgr_fd.c, memmgr_init.c,memmgr_map.c,
vmm_fault.c files.
|
|
|