Index: /soft/giet_vm/giet_fat32/fat32.c
===================================================================
--- /soft/giet_vm/giet_fat32/fat32.c	(revision 428)
+++ /soft/giet_vm/giet_fat32/fat32.c	(revision 429)
@@ -193,10 +193,10 @@
 #if GIET_DEBUG_FAT
 unsigned int procid  = _get_procid();
-unsigned int cid     = procid / NB_PROCS_MAX;
-unsigned int lpid    = procid % NB_PROCS_MAX;
-unsigned int x       = cid >> Y_WIDTH;
-unsigned int y       = cid & ((1<<Y_WIDTH) - 1);
+unsigned int x       = procid >> (Y_WIDTH + P_WIDTH);
+unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
+unsigned int p       = procid & ((1<<P_WIDTH)-1);
+
 _printf("\n[FAT DEBUG] _get_next_cluster() : P[%d,%d,%d] enters for cluster %x\n",
-        x, y, lpid, cluster );
+        x, y, p, cluster );
 #endif
 
@@ -231,5 +231,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] _get_next_cluster() : P[%d,%d,%d] next cluster = %x\n",
-        x, y, lpid, next );
+        x, y, p, next );
 #endif
 
@@ -820,10 +820,10 @@
 #if GIET_DEBUG_FAT
 unsigned int procid  = _get_procid();
-unsigned int cid     = procid / NB_PROCS_MAX;
-unsigned int lpid    = procid % NB_PROCS_MAX;
-unsigned int x       = cid >> Y_WIDTH;
-unsigned int y       = cid & ((1<<Y_WIDTH) - 1);
+unsigned int x       = procid >> (Y_WIDTH + P_WIDTH);
+unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
+unsigned int p       = procid & ((1<<P_WIDTH)-1);
+
 _printf("\n[FAT DEBUG] _scan_directory() : P[%d,%d,%d] enters for %s / is_sfn = %d\n", 
-        x, y, lpid, file_name, is_sfn );
+        x, y, p, file_name, is_sfn );
 #endif
 
@@ -973,5 +973,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] _scan_directory() : P[%d,%d,%d] found %s / cluster = %x\n", 
-        x, y, lpid, file_name, searched_cluster );
+        x, y, p, file_name, searched_cluster );
 #endif
 
@@ -1010,10 +1010,9 @@
 #if GIET_DEBUG_FAT
 unsigned int procid  = _get_procid();
-unsigned int cid     = procid / NB_PROCS_MAX;
-unsigned int lpid    = procid % NB_PROCS_MAX;
-unsigned int x       = cid >> Y_WIDTH;
-unsigned int y       = cid & ((1<<Y_WIDTH) - 1);
-
-_printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] enters", x, y, lpid );
+unsigned int x       = procid >> (Y_WIDTH + P_WIDTH);
+unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
+unsigned int p       = procid & ((1<<P_WIDTH)-1);
+
+_printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] enters", x, y, p );
 if ( mode == IOC_BOOT_MODE   ) _printf(" / IOC_BOOT_MODE\n");
 if ( mode == IOC_KERNEL_MODE ) _printf(" / IOC_KERNEL_MODE\n");
@@ -1095,7 +1094,7 @@
 
 #if GIET_DEBUG_FAT
-_printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] initialises FAT descriptor\n", x, y, lpid );
+_printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] initialises FAT descriptor\n", x, y, p );
 _fat_print();
-_printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] exit\n", x, y, lpid );
+_printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] exit\n", x, y, p );
 #endif
 
@@ -1145,10 +1144,10 @@
 #if GIET_DEBUG_FAT
 unsigned int procid  = _get_procid();
-unsigned int cid     = procid / NB_PROCS_MAX;
-unsigned int lpid    = procid % NB_PROCS_MAX;
-unsigned int x       = cid >> Y_WIDTH;
-unsigned int y       = cid & ((1<<Y_WIDTH) - 1);
+unsigned int x       = procid >> (Y_WIDTH + P_WIDTH);
+unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
+unsigned int p       = procid & ((1<<P_WIDTH)-1);
+
 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] enters for path %s\n",
-        x, y, lpid, pathname );
+        x, y, p, pathname );
 #endif
 
@@ -1165,5 +1164,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] takes the FAT lock\n",
-        x, y, lpid );
+        x, y, p );
 #endif
 
@@ -1193,5 +1192,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] search dir/file : %s\n",
-        x, y, lpid, name );
+        x, y, p, name );
 #endif
 
@@ -1223,5 +1222,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] found cluster index for file %s : %x\n",
-        x, y, lpid, pathname, cluster );
+        x, y, p, pathname, cluster );
 #endif
 
@@ -1249,5 +1248,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] exit : fd = %d for file %s\n",
-        x, y, lpid, fd_id, pathname );
+        x, y, p, fd_id, pathname );
 #endif
 
@@ -1343,8 +1342,7 @@
 #if GIET_DEBUG_FAT
 unsigned int procid  = _get_procid();
-unsigned int cid     = procid / NB_PROCS_MAX;
-unsigned int lpid    = procid % NB_PROCS_MAX;
-unsigned int x       = cid >> Y_WIDTH;
-unsigned int y       = cid & ((1<<Y_WIDTH) - 1);
+unsigned int x       = procid >> (Y_WIDTH + P_WIDTH);
+unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
+unsigned int p       = procid & ((1<<P_WIDTH)-1);
 _printf("\n[FAT DEBUG] _fat_read() : P[%d,%d,%d] enters for file %s\n"
         " - buffer vbase    = %x\n"
@@ -1353,5 +1351,5 @@
         " - first cluster   = %x\n"
         " - skiped clusters = %x\n",
-        x, y, lpid, fat.fd[fd_id].name, 
+        x, y, p, fat.fd[fd_id].name, 
         (unsigned int)buffer, offset, count, cluster, clusters_to_skip );   
 #endif
@@ -1388,5 +1386,5 @@
         " - lba     = %x\n"
         " - sectors = %d\n",
-        x, y, lpid, cluster, (unsigned int)dst, lba, iter_sectors );
+        x, y, p, cluster, (unsigned int)dst, lba, iter_sectors );
 #endif
 
@@ -1463,8 +1461,8 @@
 #if GIET_DEBUG_FAT
 unsigned int procid  = _get_procid();
-unsigned int cid     = procid / NB_PROCS_MAX;
-unsigned int lpid    = procid % NB_PROCS_MAX;
-unsigned int x       = cid >> Y_WIDTH;
-unsigned int y       = cid & ((1<<Y_WIDTH) - 1);
+unsigned int x       = procid >> (Y_WIDTH + P_WIDTH);
+unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
+unsigned int p       = procid & ((1<<P_WIDTH)-1);
+
 _printf("\n[FAT DEBUG] _fat_write() : P[%d,%d,%d] enters for file %s\n",
         " - buffer vbase    = %x\n"
@@ -1473,5 +1471,5 @@
         " - file sectors    = %x\n" 
         " - need allocate   = %d\n", 
-        x, y, lpid, fat.fd[fd_id].name, (unsigned int)buffer, 
+        x, y, p, fat.fd[fd_id].name, (unsigned int)buffer, 
         offset, count, file_sectors, allocate );
 #endif
@@ -1544,5 +1542,5 @@
 _printf("\n[FAT DEBUG] _fat_write() : P[%d,%d,%d] makes an IOC write : "
         "buf = %x / lba = %x / sectors = %x\n",
-        x, y, lpid, (unsigned int)src, lba, iter_sectors );
+        x, y, p, (unsigned int)src, lba, iter_sectors );
 #endif
 
