#include "config.h"
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/file.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <time.h>
#include "misc.h"
#include "sys_generic.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
INTERNAL int | SYS_Initialize (void) |
Make system wide initialization. | |
INTERNAL int | SYS_Mkdir (char *path, int perms) |
Attempts to create a directory with some permissions. | |
INTERNAL int | SYS_GetPID (void) |
Gets the running process's ID. | |
INTERNAL int | SYS_Sleep (int iTimeVal) |
Makes the current process sleep for some seconds. | |
INTERNAL int | SYS_USleep (int iTimeVal) |
Makes the current process sleep for some microseconds. | |
INTERNAL int | SYS_OpenFile (char *pcFile, int flags, int mode) |
Opens/creates a file. | |
INTERNAL int | SYS_CloseFile (int iHandle) |
Opens/creates a file. | |
INTERNAL int | SYS_RemoveFile (char *pcFile) |
Removes a file. | |
INTERNAL int | SYS_Chmod (const char *path, int mode) |
INTERNAL int | SYS_Chdir (const char *path) |
INTERNAL int | SYS_Mkfifo (const char *path, int mode) |
INTERNAL int | SYS_Mknod (const char *path, int mode, int dev) |
INTERNAL int | SYS_GetUID (void) |
INTERNAL int | SYS_GetGID (void) |
INTERNAL int | SYS_Chown (const char *fname, int uid, int gid) |
INTERNAL int | SYS_ChangePermissions (char *pcFile, int mode) |
INTERNAL int | SYS_LockFile (int iHandle) |
Makes a non-blocking request to lock a file exclusively. | |
INTERNAL int | SYS_LockAndBlock (int iHandle) |
Makes a blocking request to lock a file exclusively. | |
INTERNAL int | SYS_UnlockFile (int iHandle) |
Unlocks the file. | |
INTERNAL int | SYS_SeekFile (int iHandle, int iSeekLength) |
INTERNAL int | SYS_ReadFile (int iHandle, char *pcBuffer, int iLength) |
INTERNAL int | SYS_WriteFile (int iHandle, char *pcBuffer, int iLength) |
INTERNAL int | SYS_GetPageSize (void) |
Gets the memory page size. | |
INTERNAL void * | SYS_MemoryMap (int iSize, int iFid, int iOffset) |
Map the file iFid in memory for reading and writing. | |
INTERNAL void * | SYS_PublicMemoryMap (int iSize, int iFid, int iOffset) |
Map the file iFid in memory only for reading. | |
INTERNAL int | SYS_MMapSynchronize (void *begin, int length) |
Writes the changes made in a memory map to the disk mapped file. | |
INTERNAL int | SYS_Fork (void) |
INTERNAL int | SYS_Daemon (int nochdir, int noclose) |
put the process to run in the background. | |
INTERNAL int | SYS_Wait (int iPid, int iWait) |
INTERNAL int | SYS_Stat (char *pcFile, struct stat *psStatus) |
INTERNAL int | SYS_Fstat (int iFd) |
INTERNAL int | SYS_RandomInt (int fStart, int fEnd) |
INTERNAL int | SYS_GetSeed (void) |
INTERNAL void | SYS_Exit (int iRetVal) |
INTERNAL int | SYS_Rmdir (char *pcFile) |
INTERNAL int | SYS_Unlink (char *pcFile) |
Definition in file sys_unix.c.
|
Opens/creates a file.
Definition at line 138 of file sys_unix.c. Referenced by SCardEstablishContextTH(), SCardUnload(), SHMCleanupSharedSegment(), SHMClientCloseSession(), SHMClientSetupSession(), SHMProcessCommonChannelRequest(), SHMProcessEventsContext(), and SYS_Daemon(). |
|
put the process to run in the background.
Definition at line 384 of file sys_unix.c. References Log2, SYS_Chdir(), SYS_CloseFile(), and SYS_Fork(). Referenced by main(). |
|
Gets the memory page size.
The page size is used when calling the
Definition at line 297 of file sys_unix.c. Referenced by EHInitializeEventStructures(), EHStatusHandlerThread(), and SCardEstablishContextTH(). |
|
Gets the running process's ID.
Definition at line 71 of file sys_unix.c. |
|
Make system wide initialization.
Definition at line 43 of file sys_unix.c. Referenced by SCardEstablishContextTH(). |
|
Makes a blocking request to lock a file exclusively.
Definition at line 231 of file sys_unix.c. |
|
Makes a non-blocking request to lock a file exclusively.
Definition at line 206 of file sys_unix.c. |
|
Map the file
Definition at line 311 of file sys_unix.c. Referenced by EHInitializeEventStructures(). |
|
Attempts to create a directory with some permissions.
Definition at line 61 of file sys_unix.c. Referenced by main(). |
|
Writes the changes made in a memory map to the disk mapped file.
Definition at line 359 of file sys_unix.c. Referenced by EHStatusHandlerThread(). |
|
Opens/creates a file.
Definition at line 124 of file sys_unix.c. Referenced by EHInitializeEventStructures(), and SCardEstablishContextTH(). |
|
Map the file
Definition at line 339 of file sys_unix.c. Referenced by SCardEstablishContextTH(). |
|
Removes a file.
Definition at line 152 of file sys_unix.c. Referenced by EHInitializeEventStructures(). |
|
Makes the current process sleep for some seconds.
Definition at line 81 of file sys_unix.c. Referenced by SVCServiceRunLoop(). |
|
Unlocks the file.
Definition at line 256 of file sys_unix.c. |
|
Makes the current process sleep for some microseconds.
Definition at line 99 of file sys_unix.c. Referenced by EHDestroyEventHandler(), EHStatusHandlerThread(), SCardConnect(), SCardDisconnect(), SCardDisconnectTH(), SCardEndTransactionTH(), and SCardReconnect(). |