Index: trunk/kernel/libk/xlist.h
===================================================================
--- trunk/kernel/libk/xlist.h	(revision 457)
+++ trunk/kernel/libk/xlist.h	(revision 563)
@@ -1,3 +1,6 @@
 /*
+    // check calling thread can yield
+    thread_assert_can_yield( this , __FUNCTION__ );
+
  * xlist.h - Double Circular Linked lists, using extended pointers.
  *
@@ -78,6 +81,6 @@
  **************************************************************************/
 
-#define XLIST_FIRST_ELEMENT( root_xp , type , member ) \
-    ({ xptr_t __first = hal_remote_lwd( root_xp );     \
+#define XLIST_FIRST( root_xp , type , member ) \
+    ({ xptr_t __first = hal_remote_l64( root_xp );     \
 	   XLIST_ELEMENT( __first , type , member ); })
 
@@ -92,11 +95,11 @@
  **************************************************************************/
 
-#define XLIST_LAST_ELEMENT( root_xp , type , member )  \
-    ({ xptr_t __last = hal_remote_lwd( root_xp + 8 );  \
+#define XLIST_LAST( root_xp , type , member )  \
+    ({ xptr_t __last = hal_remote_l64( root_xp + 8 );  \
 	   XLIST_ELEMENT( __last , type , member ); })
 
 /***************************************************************************
  * This macro traverses an extended double linked list in forward order.
- * The iter variable should NOT be deleted during traversal. 
+ * WARNING : the iter variable should NOT be deleted during traversal. 
  * @ root_xp  : extended pointer on the root xlist_entry_t
  * @ iter_xp  : current extended pointer on a xlist_entry_t
@@ -104,11 +107,11 @@
 
 #define XLIST_FOREACH( root_xp , iter_xp )    \
-for( (iter_xp) = hal_remote_lwd( root_xp ) ;  \
+for( (iter_xp) = hal_remote_l64( root_xp ) ;  \
      (iter_xp) != (root_xp) ;                 \
-     (iter_xp) = hal_remote_lwd( iter_xp ) )
+     (iter_xp) = hal_remote_l64( iter_xp ) )
 
 /***************************************************************************
  * This macro traverses an extended double linked list in backward order.
- * The iter variable should NOT be deleted during traversal. 
+ * WARNING : the iter variable should NOT be deleted during traversal. 
  * @ root_xp  : extended pointer on the root xlist_entry_t
  * @ iter_xp  : current extended pointer on a xlist_entry_t
@@ -116,7 +119,7 @@
 
 #define XLIST_FOREACH_BACKWARD( root_xp , iter_xp )  \
-for( (iter_xp) = hal_remote_lwd( (root_xp) + 8 ) ;   \
+for( (iter_xp) = hal_remote_l64( (root_xp) + 8 ) ;   \
      (iter_xp) != (root_xp) ;                        \
-     (iter_xp) = hal_remote_lwd( (iter_xp) + 8 ) )
+     (iter_xp) = hal_remote_l64( (iter_xp) + 8 ) )
 
 /***************************************************************************
@@ -130,8 +133,8 @@
 {
     // get root->next
-    xptr_t root_next = (xptr_t)hal_remote_lwd( root );
+    xptr_t root_next = (xptr_t)hal_remote_l64( root );
 
     // get ref->next
-    xptr_t ref_next  = (xptr_t)hal_remote_lwd( ref );
+    xptr_t ref_next  = (xptr_t)hal_remote_l64( ref );
 
     // test if list is empty or ref is the last element  
@@ -150,8 +153,8 @@
 {
     // get root->next
-    xptr_t root_next = (xptr_t)hal_remote_lwd( root );
+    xptr_t root_next = (xptr_t)hal_remote_l64( root );
 
     // get ref->pred
-    xptr_t ref_pred  = (xptr_t)hal_remote_lwd( ref + 8 );
+    xptr_t ref_pred  = (xptr_t)hal_remote_l64( ref + 8 );
 
     // test if list is empty or ref is the first element  
@@ -165,9 +168,9 @@
  * The root can be located in any cluster.
  * @ root_xp   :  extended pointer on the root xlist_entry_t
- **************************************************************************/
+xixi **************************************************************************/
 static inline void xlist_root_init( xptr_t root_xp )
 {
-    hal_remote_swd(  root_xp   , root_xp );
-    hal_remote_swd(  root_xp+8 , root_xp );
+    hal_remote_s64(  root_xp   , root_xp );
+    hal_remote_s64(  root_xp+8 , root_xp );
 }
 
@@ -179,6 +182,6 @@
 static inline void xlist_entry_init( xptr_t entry_xp )
 {
-    hal_remote_swd(  entry_xp   , 0 );
-    hal_remote_swd(  entry_xp+8 , 0 );
+    hal_remote_s64(  entry_xp   , 0 );
+    hal_remote_s64(  entry_xp+8 , 0 );
 }
 
@@ -194,17 +197,17 @@
 {
     // get the extended pointer on the first element in list
-    xptr_t first = (xptr_t)hal_remote_lwd( root );
+    xptr_t first = (xptr_t)hal_remote_l64( root );
 
     // update root.next <= entry
-    hal_remote_swd( root , (uint64_t)entry );
+    hal_remote_s64( root , (uint64_t)entry );
 
     // update entry.next <= first
-    hal_remote_swd( entry , (uint64_t)first );
+    hal_remote_s64( entry , (uint64_t)first );
 
     // entry.pred <= root 
-    hal_remote_swd( entry + 8 , (uint64_t)root );
+    hal_remote_s64( entry + 8 , (uint64_t)root );
     
     // first.pred <= new
-    hal_remote_swd( first + 8 , (uint64_t)entry );
+    hal_remote_s64( first + 8 , (uint64_t)entry );
 }
 
@@ -220,17 +223,17 @@
 {
     // get the extended pointer on the last element in list
-    xptr_t last = (xptr_t)hal_remote_lwd( root + 8 );
+    xptr_t last = (xptr_t)hal_remote_l64( root + 8 );
 
     // update root.pred <= entry
-    hal_remote_swd( root + 8 , (uint64_t)entry );
+    hal_remote_s64( root + 8 , (uint64_t)entry );
 
     // update entry.pred <= last
-    hal_remote_swd( entry + 8 , (uint64_t)last );
+    hal_remote_s64( entry + 8 , (uint64_t)last );
 
     // entry.next <= root 
-    hal_remote_swd( entry , (uint64_t)root );
+    hal_remote_s64( entry , (uint64_t)root );
     
     // last.next <= entry
-    hal_remote_swd( last , (uint64_t)entry );
+    hal_remote_s64( last , (uint64_t)entry );
 }
 
@@ -243,5 +246,5 @@
 {
     // get the extended pointer root.next value
-    xptr_t next = (xptr_t)hal_remote_lwd( root );
+    xptr_t next = (xptr_t)hal_remote_l64( root );
 
     return ( root == next );
@@ -266,8 +269,8 @@
 
     // update pred.next <= next
-    hal_remote_swd( pred , (uint64_t)next );
+    hal_remote_s64( pred , (uint64_t)next );
 
     // update next.pred <= pred
-    hal_remote_swd( next + 8 , (uint64_t)pred );
+    hal_remote_s64( next + 8 , (uint64_t)pred );
 }
 
@@ -292,14 +295,14 @@
 
 	// update new.next <= next
-    hal_remote_swd( new , (uint64_t)next );
+    hal_remote_s64( new , (uint64_t)next );
 
     // update new.pred <= pred
-    hal_remote_swd( new + 8 , (uint64_t)pred );
+    hal_remote_s64( new + 8 , (uint64_t)pred );
 
 	// update pred.next <= new
-    hal_remote_swd( pred , (uint64_t)new );
+    hal_remote_s64( pred , (uint64_t)new );
 
     // update next.pred <= new
-    hal_remote_swd( next + 8 , (uint64_t)new );
+    hal_remote_s64( next + 8 , (uint64_t)new );
 }
 
