io_wrapper_open — Open a handle to a resource
io_object * **io_wrapper_open** ( | filename, | |
| | options, | |
| | mode
); | |
Open a handle to a resource.
This function may induce IO or otherwise block the caller. Blocking in the scheduler thread will lead to degraded performance and should be avoided at all costs. If your code is running in the IO subsystem, the core will have already taken steps to ensure that blocking is acceptable. Otherwise, you should look at using the thread pool API to run a job in the IO pool.
You must use io_wrapper_delref to dispose of any object opened using this function. The object won't be destroyed until its last reference is dropped.
The name of the resource.
Options can be any bitwise OR of the flags used with
open(3), for example
The file mode in octal notation.
This function returns a handle to the resource.
It is legal to call this function in any thread.