Browse code

htable: elaborated docs about sht_lock() and sht_unlock()

(cherry picked from commit 44269cd654a6ab0557ca242f25ec41158e7dcbaf)

Daniel-Constantin Mierla authored on 08/11/2014 10:10:11
Showing 2 changed files
... ...
@@ -672,7 +672,9 @@ sht_reset("ha$var(x)");
672 672
 
673 673
 4.5.  sht_lock(htable=>key)
674 674
 
675
-   Lock the slot in htable corespoding to the key item.
675
+   Lock the slot in htable corespoding to the key item. Note that the
676
+   locking is re-entrant for the process, therefore the lock and unlock
677
+   should be done by the same process.
676 678
 
677 679
    This function can be used from ANY_ROUTE.
678 680
 
... ...
@@ -683,7 +685,9 @@ sht_lock("ha=>test");
683 685
 
684 686
 4.6.  sht_unlock(htable=>key)
685 687
 
686
-   Unlock the slot in htable corespoding to the key item.
688
+   Unlock the slot in htable corespoding to the key item. Note that the
689
+   locking is re-entrant for the process, therefore the lock and unlock
690
+   should be done by the same process.
687 691
 
688 692
    This function can be used from ANY_ROUTE.
689 693
 
... ...
@@ -735,7 +735,9 @@ sht_reset("ha$var(x)");
735 735
 		<function moreinfo="none">sht_lock(htable=>key)</function>
736 736
 		</title>
737 737
 		<para>
738
-			Lock the slot in htable corespoding to the key item.
738
+			Lock the slot in htable corespoding to the key item. Note that
739
+			the locking is re-entrant for the process, therefore the lock
740
+			and unlock should be done by the same process.
739 741
 		</para>
740 742
 		<para>
741 743
 			This function can be used from ANY_ROUTE.
... ...
@@ -754,7 +756,9 @@ sht_lock("ha=>test");
754 756
 		<function moreinfo="none">sht_unlock(htable=>key)</function>
755 757
 		</title>
756 758
 		<para>
757
-			Unlock the slot in htable corespoding to the key item.
759
+			Unlock the slot in htable corespoding to the key item. Note that
760
+			the locking is re-entrant for the process, therefore the lock
761
+			and unlock should be done by the same process.
758 762
 		</para>
759 763
 		<para>
760 764
 			This function can be used from ANY_ROUTE.