The Mono.Unix.Native namespace contains low-level wrapper classes, structures, and enumerations which are accessible from the Mono.Unix.Native.Syscall and Mono.Unix.Native.Stdlib classes, which are a low-level wrappers over ANSI C, POSIX and Unix system calls and library functions.
Thread-safety wasn't handled in the original Unix API. While some degree of thread-safety is provided from managed code, it is impossible to provide full thread-safety for interactions between managed and unmanaged code. For example, if you DllImport into a C library which uses non-thread-safe Unix functions which are also exposed in Mono.Unix.Native, you may have threading issues including, but not limited to, memory corruption.
An effort is made to provide thread-safety from managed code, but it is impossible to know all dependencies for all potential Unix-like platforms. For example, is Mono.Unix.Native.Stdlib.fopen thread-safe? It appears to be under glibc, but isn't necessarily under all Unix platforms. Mono.Unix.Native.Stdlib assumes that it is. Only obviously unsafe exports are actually synchronized from managed code, such as Mono.Unix.Native.Stdlib.tmpnam and Mono.Unix.Native.Stdlib.strerror.
Documentation is based upon the FreeBSD man pages, which is under the following copyright:
FreeBSD Copyright Example
Copyright (c) 1980, 1983, 1986, 1991, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
| Type | Reason |
|---|---|
| AccessModes | Represents the access mode of a task: read, write, execute or test if the file exists. |
| CdeclFunction | Permits calling a varargs (cdecl) function from a library. |
| ConfstrName | Documentation for this section has not yet been entered. |
| DirectoryNotifyFlags | File and directory change notification flags for Mono.Unix.Native.Syscall.fcntl. |
| Dirent | Information about a directory entry. |
| Errno | Error values. |
| FcntlCommand | Possible Mono.Unix.Native.Syscall.fcntlcommand values. |
| FilePermissions | The FilePermissions enumeration describes file system modes (read,write,execute) as described in the POSIX standard. |
| FilePosition | A wrapper for the platform-specific fpos_t. |
| Flock | Mono.Unix.Native.Syscall.fcntl(2) advisory file locking information. |
| Fstab | File system descriptor file entry. |
| Group | Group database entry. |
| LockfCommand | Possible Mono.Unix.Native.Syscall.lockfcmd values. |
| LockType | The type of lock to place on a file. |
| MlockallFlags | Documentation for this section has not yet been entered. |
| MmapFlags | Possible Mono.Unix.Native.Syscall.mmapflags values. |
| MmapProts | Possible Mono.Unix.Native.Syscall.mmapprot values. |
| MountFlags | Possible Mono.Unix.Native.Statvfs.f_flag values. |
| MremapFlags | Possible Mono.Unix.Native.Syscall.mremapflags values. |
| MsyncFlags | Possible Mono.Unix.Native.Syscall.msyncflags values. |
| NativeConvert | Performs conversions between managed and unmanaged enumeration values. |
| OpenFlags | Possible Mono.Unix.Native.Syscall.openflags values. |
| Passwd | Password database entry. |
| PathconfName | Documentation for this section has not yet been entered. |
| PollEvents | Events which may be Mono.Unix.Native.Syscall.poll(2)ed for. |
| Pollfd | Polling information for Mono.Unix.Native.Syscall.poll. |
| PosixFadviseAdvice | Possible Mono.Unix.Native.Syscall.posix_fadviseadvice values. |
| PosixMadviseAdvice | Possible Mono.Unix.Native.Syscall.posix_madviseadvice values. |
| SeekFlags | Where to interpret offsets from. |
| SignalAction | The set of actions to perform on receipt of a Unix signal. |
| SignalHandler | A delegate to handle POSIX signals. |
| Signum | List of available signals. |
| Stat | Every file has a unique INODE data structure. Mono's managed representation is the Stat struct. the Mono.Unix.Native.Syscall.stat and Mono.Unix.Native.Syscall.lstat methods return the Stat struct as an output parameter. |
| Statvfs | File system statistics. |
| Stdlib | C Standard Library functions. |
| Syscall | The Syscall wrapper class makes it possible to execute the defined system calls. For more information on any of these system calls, the linux manual system (man) has exhaustive information on each syscall in section two: 'man 2 chdir' (or often chdir(2)) for example would give information related to chdir, including error codes, which are in general not listed here. |
| SysconfName | Documentation for this section has not yet been entered. |
| SyslogFacility | System logging facilities. |
| SyslogLevel | System logging levels. |
| SyslogOptions | System logging options. |
| Timespec | Documentation for this section has not yet been entered. |
| Timeval | Microsecond-precision time value. |
| Timezone | Timezone information. DO NOT USE. |
| Utimbuf | File time information. |
| Utsname | Documentation for this section has not yet been entered. |
| WaitOptions | Wait options for the Mono.Unix.Native.Syscall.waitpid syscall method. |
| XattrFlags | Documentation for this section has not yet been entered. |