## winix-base-file-io-driver-for-posix-g.pkg
#
# This is a multithreading-oriented replacement for the standard.lib generick
#
#
src/lib/std/src/io/winix-base-file-io-driver-for-posix-g--premicrothread.pkg#
# We use it to generate the text and binary file io drivers for posix,
# since they are nearly identical.
#
# See also:
#
#
src/lib/std/src/io/winix-base-file-io-driver-for-posix-g--premicrothread.pkg# Compiled by:
#
src/lib/std/standard.libstipulate
package thk = threadkit; # threadkit is from
src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg package wnx = winix__premicrothread; # winix__premicrothread is from
src/lib/std/winix--premicrothread.pkg package wio = winix__premicrothread::io; # winix_io__premicrothread is from
src/lib/std/src/posix/winix-io--premicrothread.pkgherein
# This generic is invoked (only) in:
#
#
src/lib/std/src/io/winix-base-data-file-io-driver-for-posix.pkg #
src/lib/std/src/io/winix-base-text-file-io-driver-for-posix.pkg #
generic package winix_base_file_io_driver_for_posix_g (
# ===============================================
#
package rv: Typelocked_Vector; # Typelocked_Vector is from
src/lib/std/src/typelocked-vector.api package wv: Typelocked_Rw_Vector; # Typelocked_Rw_Vector is from
src/lib/std/src/typelocked-rw-vector.api package rvs: Typelocked_Vector_Slice; # Typelocked_Vector_Slice is from
src/lib/std/src/typelocked-vector-slice.api package wvs: Typelocked_Rw_Vector_Slice; # Typelocked_Rw_Vector_Slice is from
src/lib/std/src/typelocked-rw-vector-slice.api sharing rv::Vector == wv::Vector == rvs::Vector == wvs::Vector;
sharing rv::Element == wv::Element == rvs::Element == wvs::Element;
sharing wvs::Vector_Slice == rvs::Slice;
some_element: rv::Element;
eqtype File_Position;
compare: (File_Position, File_Position) -> Order;
)
: (weak) Winix_Base_File_Io_Driver_For_Os # Winix_Base_File_Io_Driver_For_Os is from
src/lib/std/src/io/winix-base-file-io-driver-for-os.api {
Mailop(X) = thk::Mailop(X);
Element = wv::Element;
Vector = rv::Vector;
Rw_Vector = wv::Rw_Vector;
Rw_Vector_Slice = wvs::Slice;
Vector_Slice = rvs::Slice;
File_Position = File_Position;
compare = compare;
Filereader
=
FILEREADER
{
filename: String,
best_io_quantum: Int,
read_vector: Int -> Vector,
read_vector_mailop: Int -> Mailop( Vector ),
avail: Void -> Null_Or( Int ), # Number of items certainly available to read without blocking.
get_file_position: Null_Or( Void -> File_Position ),
set_file_position: Null_Or( File_Position -> Void ),
end_file_position: Null_Or( Void -> File_Position ),
verify_file_position: Null_Or( Void -> File_Position ),
close: Void -> Void,
io_descriptor: Null_Or( wio::Iod )
};
Filewriter
=
FILEWRITER
{
filename: String,
best_io_quantum: Int,
write_vector: Vector_Slice -> Int,
write_rw_vector: Rw_Vector_Slice -> Int,
write_vector_mailop: Vector_Slice -> Mailop( Int ),
write_rw_vector_mailop: Rw_Vector_Slice -> Mailop( Int ),
end_file_position: Null_Or( Void -> File_Position ),
verify_file_position: Null_Or( Void -> File_Position ),
get_file_position: Null_Or( Void -> File_Position ),
set_file_position: Null_Or( File_Position -> Void ),
close: Void -> Void,
io_descriptor: Null_Or( wio::Iod )
};
}; # filereaders_and_filewriters
end;
## COPYRIGHT (c) 1991 John H. Reppy.
## COPYRIGHT (c) 1996 AT&T Research.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.