LinuxSystemTypes

Defines system specific types which are used in public interfaces.  System specific known only to the implementation do not need to be public.

Summary
LinuxSystemTypesDefines system specific types which are used in public interfaces.
CopyrightThis program is free software.
Files
C-kern/api/platform/Linux/systypes.hHeader file LinuxSystemTypes.
C-kern/konfig.hIncluded from Konfiguration.
sytem specific configurations
System Specific Public Types
Public System Types
sys_iochannel_tChoose Posix file descriptor type.
sys_iochannel_STDINChoose Posix STDIN file descriptor number.
sys_iochannel_STDOUTChoose Posix STDOUT file descriptor number.
sys_iochannel_STDERRChoose Posix STDERR file descriptor number.
sys_iochannel_FREEChoose Posix file descriptor type.
sys_mutex_tChooses Posix mutex type.
sys_mutex_INIT_DEFAULTStatic initializer for sys_mutex_t.
sys_path_MAXSIZEThe maximum size in bytes of a file system path.
sys_process_tChooses Posix process id.
sys_process_FREEStatic initializer for sys_process_t.
sys_semaphore_tChooses Posix semaphore handle.
sys_semaphore_FREEStatic initializer for sys_semaphore_t.
sys_socketaddr_tChooses Posix socket address type.
sys_socketaddr_MAXSIZEDefined as Posix specific size of IPv6 addresses.
sys_thread_tChooses Posix thread type.
sys_thread_FREEStatic initializer for sys_thread_t.
sys_userid_tChooses Posix system user id.
sys_userid_FREEStatic initializer for sys_userid_t.

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2012 Jörg Seebohn

Files

C-kern/api/platform/Linux/systypes.h

Header file LinuxSystemTypes.

C-kern/konfig.h

Included from Konfiguration.

sytem specific configurations

Summary
System Specific Public Types
Public System Types
sys_iochannel_tChoose Posix file descriptor type.
sys_iochannel_STDINChoose Posix STDIN file descriptor number.
sys_iochannel_STDOUTChoose Posix STDOUT file descriptor number.
sys_iochannel_STDERRChoose Posix STDERR file descriptor number.
sys_iochannel_FREEChoose Posix file descriptor type.
sys_mutex_tChooses Posix mutex type.
sys_mutex_INIT_DEFAULTStatic initializer for sys_mutex_t.
sys_path_MAXSIZEThe maximum size in bytes of a file system path.
sys_process_tChooses Posix process id.
sys_process_FREEStatic initializer for sys_process_t.
sys_semaphore_tChooses Posix semaphore handle.
sys_semaphore_FREEStatic initializer for sys_semaphore_t.
sys_socketaddr_tChooses Posix socket address type.
sys_socketaddr_MAXSIZEDefined as Posix specific size of IPv6 addresses.
sys_thread_tChooses Posix thread type.
sys_thread_FREEStatic initializer for sys_thread_t.
sys_userid_tChooses Posix system user id.
sys_userid_FREEStatic initializer for sys_userid_t.

System Specific Public Types

Public System Types

sys_iochannel_tType holding system specific description of a file descriptor.  Which is used for files and network connections (sockets).
sys_iochannel_FREEStatic initializer for sys_iochannel_t.  It marks the file descriptor as invalid.
sys_mutex_tType holding system specific description of a mutex (lock).
sys_mutex_INIT_DEFAULTStatic initializer for a mutex useable by threads of the same process.
sys_process_tType represents a system process.
sys_process_FREEStatic initializer for a process.  It sets a process id or handle to an invalid value.
sys_semaphore_tType holding system specific description of a semaphore.
sys_semaphore_FREEStatic initializer for a semaphore.  It sets a semaphore handle to an invalid value.
sys_socketaddr_tType holding network addresses used from sockets.
sys_socketaddr_MAXSIZEValue which holds max size in bytes of all possible socket addresses.
sys_thread_tType holding system specific description of a thread.
sys_thread_FREEStatic initializer for a thread.  It sets a thread id or handle to an invalid value.
sys_userid_tType holding system specific description of a system user id.
sys_userid_FREEStatic initializer for a system user id.  It sets a user id to an invalid value.

sys_iochannel_t

#define sys_iochannel_t int

Choose Posix file descriptor type.

sys_iochannel_STDIN

#define sys_iochannel_STDIN STDIN_FILENO

Choose Posix STDIN file descriptor number.

sys_iochannel_STDOUT

#define sys_iochannel_STDOUT STDOUT_FILENO

Choose Posix STDOUT file descriptor number.

sys_iochannel_STDERR

#define sys_iochannel_STDERR STDERR_FILENO

Choose Posix STDERR file descriptor number.

sys_iochannel_FREE

#define sys_iochannel_FREE (-1)

Choose Posix file descriptor type.

sys_mutex_t

#define sys_mutex_t pthread_mutex_t

Chooses Posix mutex type.  Needs pthread support.

sys_mutex_INIT_DEFAULT

#define sys_mutex_INIT_DEFAULT PTHREAD_MUTEX_INITIALIZER

Static initializer for sys_mutex_t.

sys_path_MAXSIZE

#define sys_path_MAXSIZE PATH_MAX

The maximum size in bytes of a file system path.  The size includes the trailing ‘\0’ byte.

sys_process_t

#define sys_process_t pid_t

Chooses Posix process id.

sys_process_FREE

#define sys_process_FREE ()

Static initializer for sys_process_t.

sys_semaphore_t

#define sys_semaphore_t int

Chooses Posix semaphore handle.

sys_semaphore_FREE

#define sys_semaphore_FREE (-1)

Static initializer for sys_semaphore_t.

sys_socketaddr_t

#define sys_socketaddr_t struct sockaddr

Chooses Posix socket address type.

sys_socketaddr_MAXSIZE

#define sys_socketaddr_MAXSIZE sizeof(struct sockaddr_in6)

Defined as Posix specific size of IPv6 addresses.  Change this if you want to support other type of addresses than IP.

sys_thread_t

#define sys_thread_t pthread_t

Chooses Posix thread type.  Needs pthread support.

sys_thread_FREE

#define sys_thread_FREE ()

Static initializer for sys_thread_t.

sys_userid_t

#define sys_userid_t uid_t

Chooses Posix system user id.

sys_userid_FREE

#define sys_userid_FREE ((uid_t)(-1))

Static initializer for sys_userid_t.

Defines system specific types which are used in public interfaces.
Global generic configurations.
#define sys_iochannel_t int
Choose Posix file descriptor type.
#define sys_iochannel_STDIN STDIN_FILENO
Choose Posix STDIN file descriptor number.
#define sys_iochannel_STDOUT STDOUT_FILENO
Choose Posix STDOUT file descriptor number.
#define sys_iochannel_STDERR STDERR_FILENO
Choose Posix STDERR file descriptor number.
#define sys_iochannel_FREE (-1)
Choose Posix file descriptor type.
#define sys_mutex_t pthread_mutex_t
Chooses Posix mutex type.
#define sys_mutex_INIT_DEFAULT PTHREAD_MUTEX_INITIALIZER
Static initializer for sys_mutex_t.
#define sys_path_MAXSIZE PATH_MAX
The maximum size in bytes of a file system path.
#define sys_process_t pid_t
Chooses Posix process id.
#define sys_process_FREE ()
Static initializer for sys_process_t.
#define sys_semaphore_t int
Chooses Posix semaphore handle.
#define sys_semaphore_FREE (-1)
Static initializer for sys_semaphore_t.
#define sys_socketaddr_t struct sockaddr
Chooses Posix socket address type.
#define sys_socketaddr_MAXSIZE sizeof(struct sockaddr_in6)
Defined as Posix specific size of IPv6 addresses.
#define sys_thread_t pthread_t
Chooses Posix thread type.
#define sys_thread_FREE ()
Static initializer for sys_thread_t.
#define sys_userid_t uid_t
Chooses Posix system user id.
#define sys_userid_FREE ((uid_t)(-1))
Static initializer for sys_userid_t.
Close