28 #if defined (POK_NEEDS_LOCKOBJECTS) || defined (POK_NEEDS_PORTS_QUEUEING) || defined (POK_NEEDS_PORTS_SAMPLING)
47 #if POK_CONFIG_NB_LOCKOBJECTS > 0
50 #ifdef POK_NEEDS_PARTITIONS
51 #ifdef POK_NEEDS_ERROR_HANDLING
54 total_lockobjects = 0;
58 total_lockobjects = total_lockobjects + pok_partitions[i].nlockobjs;
63 pok_kernel_error (POK_ERROR_KIND_KERNEL_CONFIG);
70 pok_partitions_lockobjs[i].
spin = 0;
121 #ifdef POK_NEEDS_LOCKOBJECTS
132 if ( (POK_CURRENT_PARTITION.mode != POK_PARTITION_MODE_INIT_COLD) &&
133 (POK_CURRENT_PARTITION.mode != POK_PARTITION_MODE_INIT_WARM))
138 pid = POK_SCHED_CURRENT_PARTITION;
140 lower_bound = pok_partitions[pid].lockobj_index_low;
141 upper_bound = pok_partitions[pid].lockobj_index_high;
147 while (mid < upper_bound)
149 if (pok_partitions_lockobjs[mid].initialized ==
FALSE)
206 pok_sched_lock_current_thread_timed (timeout);
210 pok_sched_lock_current_thread ();
226 if ((timeout != 0 ) && (POK_GETTICK() >= timeout))
247 if (tmp == POK_SCHED_CURRENT_THREAD)
252 pok_sched_unlock_thread (tmp);
269 if (tmp == POK_SCHED_CURRENT_THREAD)
274 pok_sched_unlock_thread (tmp);
306 if ((attr !=
NULL) && (attr->
time > 0))
308 timeout = attr->
time;
317 pok_sched_lock_current_thread_timed (timeout);
318 if (POK_GETTICK() >= timeout)
326 pok_sched_lock_current_thread ();
357 pok_sched_unlock_thread (POK_SCHED_CURRENT_THREAD);
403 res = POK_SCHED_CURRENT_THREAD;
404 res = (res + 1) % (POK_CONFIG_NB_THREADS);
411 pok_sched_unlock_thread (res);
414 res = (res + 1) % (POK_CONFIG_NB_THREADS);
416 while ((res != POK_SCHED_CURRENT_THREAD));
424 #ifdef POK_NEEDS_LOCKOBJECTS
432 if (
id < pok_partitions[POK_SCHED_CURRENT_PARTITION].lockobj_index_low)
437 if (
id >= pok_partitions[POK_SCHED_CURRENT_PARTITION].lockobj_index_high)
442 if (pok_partitions_lockobjs[
id].kind != attr->
obj_kind)