| ... |
... |
@@ -892,22 +892,6 @@ to pass in R2 we have to use a dummy first argument which will be passed in R1 |
|
892
|
892
|
(and ignored).
|
|
893
|
893
|
*/
|
|
894
|
894
|
|
|
895
|
|
-/* Blocking for I/O primops with result IO ().
|
|
896
|
|
- * See Note [Thread blocking for new I/O primops].
|
|
897
|
|
- */
|
|
898
|
|
-stg_block_io_unit
|
|
899
|
|
-{
|
|
900
|
|
- /* Fill out the stack frame with dummy values. The IO manager will
|
|
901
|
|
- * overwrite these with the actual results when the I/O operation
|
|
902
|
|
- * completes, fails, or is cancelled.
|
|
903
|
|
- */
|
|
904
|
|
- Sp_adj(-3);
|
|
905
|
|
- Sp(0) = stg_block_io_unit_info;
|
|
906
|
|
- Sp(1) = 0; // outcome: 0 indicates IOOpOutcomeInFlight
|
|
907
|
|
- Sp(2) = 0; // result/errno
|
|
908
|
|
- BLOCK_GENERIC;
|
|
909
|
|
-}
|
|
910
|
|
-
|
|
911
|
895
|
/* stg_block_io_unit_info : the return info table for stg_block_io_unit */
|
|
912
|
896
|
INFO_TABLE_RET ( stg_block_io_unit, RET_SMALL, W_ info_ptr,
|
|
913
|
897
|
W_ outcome, W_ result )
|
| ... |
... |
@@ -925,17 +909,17 @@ INFO_TABLE_RET ( stg_block_io_unit, RET_SMALL, W_ info_ptr, |
|
925
|
909
|
}
|
|
926
|
910
|
}
|
|
927
|
911
|
|
|
928
|
|
-/* Blocking for I/O primops with result IO Int or Word (or rather Int#/Word#).
|
|
|
912
|
+/* Blocking for I/O primops with result IO ().
|
|
929
|
913
|
* See Note [Thread blocking for new I/O primops].
|
|
930
|
914
|
*/
|
|
931
|
|
-stg_block_io_int
|
|
|
915
|
+stg_block_io_unit
|
|
932
|
916
|
{
|
|
933
|
917
|
/* Fill out the stack frame with dummy values. The IO manager will
|
|
934
|
918
|
* overwrite these with the actual results when the I/O operation
|
|
935
|
919
|
* completes, fails, or is cancelled.
|
|
936
|
920
|
*/
|
|
937
|
921
|
Sp_adj(-3);
|
|
938
|
|
- Sp(0) = stg_block_io_int_info;
|
|
|
922
|
+ Sp(0) = stg_block_io_unit_info;
|
|
939
|
923
|
Sp(1) = 0; // outcome: 0 indicates IOOpOutcomeInFlight
|
|
940
|
924
|
Sp(2) = 0; // result/errno
|
|
941
|
925
|
BLOCK_GENERIC;
|
| ... |
... |
@@ -957,3 +941,19 @@ INFO_TABLE_RET ( stg_block_io_int, RET_SMALL, W_ info_ptr, |
|
957
|
941
|
return (result);
|
|
958
|
942
|
}
|
|
959
|
943
|
}
|
|
|
944
|
+
|
|
|
945
|
+/* Blocking for I/O primops with result IO Int or Word (or rather Int#/Word#).
|
|
|
946
|
+ * See Note [Thread blocking for new I/O primops].
|
|
|
947
|
+ */
|
|
|
948
|
+stg_block_io_int
|
|
|
949
|
+{
|
|
|
950
|
+ /* Fill out the stack frame with dummy values. The IO manager will
|
|
|
951
|
+ * overwrite these with the actual results when the I/O operation
|
|
|
952
|
+ * completes, fails, or is cancelled.
|
|
|
953
|
+ */
|
|
|
954
|
+ Sp_adj(-3);
|
|
|
955
|
+ Sp(0) = stg_block_io_int_info;
|
|
|
956
|
+ Sp(1) = 0; // outcome: 0 indicates IOOpOutcomeInFlight
|
|
|
957
|
+ Sp(2) = 0; // result/errno
|
|
|
958
|
+ BLOCK_GENERIC;
|
|
|
959
|
+} |