17 #if defined (POK_NEEDS_PORTS_SAMPLING) || defined (POK_NEEDS_PORTS_QUEUEING)
27 extern uint8_t pok_current_partition;
30 extern pok_port_t pok_ports[POK_CONFIG_NB_PORTS];
31 extern pok_queue_t pok_queue;
46 #if (defined POK_NEEDS_PARTITIONS) && (defined POK_NEEDS_ERROR_HANDLING)
47 POK_ERROR_CURRENT_PARTITION(POK_ERROR_KIND_PARTITION_CONFIGURATION);
52 if (size > pok_queue.available_size)
54 #if (defined POK_NEEDS_PARTITIONS) && (defined POK_NEEDS_ERROR_HANDLING)
55 POK_ERROR_CURRENT_PARTITION(POK_ERROR_KIND_PARTITION_CONFIGURATION);
63 #if (defined POK_NEEDS_PARTITIONS) && (defined POK_NEEDS_ERROR_HANDLING)
64 POK_ERROR_CURRENT_PARTITION(POK_ERROR_KIND_PARTITION_CONFIGURATION);
73 #ifdef POK_NEEDS_PORTS_SAMPLING
74 ret = pok_port_sampling_id (name, &gid);
80 #ifdef POK_NEEDS_PORTS_QUEUEING
81 ret = pok_port_queueing_id (name, &gid);
94 #if (defined POK_NEEDS_PARTITIONS) && (defined POK_NEEDS_ERROR_HANDLING)
95 POK_ERROR_CURRENT_PARTITION(POK_ERROR_KIND_PARTITION_INIT);
100 if (! pok_own_port (POK_SCHED_CURRENT_PARTITION, gid))
111 if (pok_ports[gid].ready ==
TRUE)
117 pok_ports[gid].
index = pok_queue.size - pok_queue.available_size;
118 pok_ports[gid].
off_b = 0;
119 pok_ports[gid].
off_e = 0;
120 pok_ports[gid].
size = size;
122 pok_ports[gid].
partition = pok_current_partition;
125 pok_ports[gid].
kind = kind;
127 pok_queue.available_size = pok_queue.available_size - size;