25 #if defined (POK_NEEDS_PORTS_QUEUEING) || defined (POK_NEEDS_PORTS_SAMPLING) 
   36 extern uint8_t          pok_ports_nb_destinations[POK_CONFIG_NB_PORTS];              
 
   38 extern uint8_t*         pok_ports_destinations[POK_CONFIG_NB_PORTS];                 
 
   40 extern pok_port_t       pok_ports[POK_CONFIG_NB_PORTS];                              
 
   41 extern uint8_t                pok_ports_nodes[POK_CONFIG_NB_GLOBAL_PORTS];                 
 
   42 extern uint8_t          pok_global_ports_to_local_ports[POK_CONFIG_NB_GLOBAL_PORTS]; 
 
   43 extern pok_queue_t      pok_queue;
 
   47 void pok_port_flush_partition (
uint8_t pid)
 
   58    nb = pok_ports_nb_ports_by_partition[pid];
 
   60    for (i = 0 ; i < nb ; i++)
 
   62       local = pok_ports_by_partition[pid][i];
 
   69       if (pok_ports[local].empty == 
TRUE)  
 
   74       if (pok_ports[local].must_be_flushed == 
FALSE)
 
   79       len = pok_port_consumed_size (local);
 
   81       if (pok_port_get (local, pok_buffer_flush, len) != 
POK_ERRNO_OK)
 
   86       ndest = pok_ports_nb_destinations[local];
 
   88       for (j=0 ; j < ndest ; j++)
 
   90          global_dest = pok_ports_destinations[local][j];
 
   92          local_dest = pok_global_ports_to_local_ports[global_dest];
 
   93          if (pok_ports[local_dest].ready != 
TRUE)
 
  103          pok_port_write (local_dest, pok_buffer_flush, len);
 
  125 void pok_port_flushall (
void)
 
  130       if ((pok_partitions[p].mode == POK_PARTITION_MODE_NORMAL) || (pok_partitions[p].mode == POK_PARTITION_MODE_IDLE))
 
  132          pok_port_flush_partition (p);