[kernel] Add new zero_ok flag to syscall params

The new zero_ok flag is similar to optional for reference parameters,
but only in cases where there is a length parameter. If that parameter
is a reference parameter itself and is null, or it is non-null and
contains a non-zero length, or there is no length parameter, then the
main parameter may not be null.
This commit is contained in:
Justin C. Miller
2022-01-30 14:21:08 -08:00
parent b6218a1121
commit da5c1e9833
3 changed files with 37 additions and 13 deletions

View File

@@ -22,7 +22,7 @@ object endpoint : object {
# is available.
method receive [cap:receive] {
param tag uint64 [out]
param data buffer [out optional]
param data buffer [out zero_ok]
param timeout uint64 # Receive timeout in nanoseconds
}
@@ -31,7 +31,7 @@ object endpoint : object {
# operation.
method sendrecv [cap:send cap:receive] {
param tag uint64 [inout]
param data buffer [inout]
param data buffer [inout zero_ok]
param timeout uint64 # Receive timeout in nanoseconds
}
}