cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Classes | Macros | Functions
unix.c File Reference
#include <stdio.h>
#include <time.h>
#include "crypt.h"
#include "random/random.h"
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <sys/errno.h>
#include <sys/ipc.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/shm.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/wait.h>

Go to the source code of this file.

Classes

struct  DATA_SOURCE_INFO
 
struct  GATHERER_INFO
 

Macros

#define DEBUG_CONFLICTS
 
#define lockPollingMutex()
 
#define unlockPollingMutex()
 
#define RANDOM_BUFSIZE   4096
 
#define ENSURES_EXIT(x)   if( !( x ) ) { assert( INTERNAL_ERROR ); exit( -1 ); }
 
#define SC(weight)   ( 1024 / weight ) /* Scale factor */
 
#define SC_0   16384 /* SC( SC_0 ) evalutes to 0 */
 
#define DEVRANDOM_BYTES   128
 
#define SLOWPOLL_TIMEOUT   30 /* Time out after 30 seconds */
 
#define SHARED_BUFSIZE   49152 /* Usually about 25K are filled */
 
#define sched_yield()
 

Functions

CHECK_RETVAL STDC_NONNULL_ARG ((1))
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 2))
 
void fastPoll (void)
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 2, 4))
 
void slowPoll (void)
 
CHECK_RETVAL int waitforRandomCompletion (const BOOLEAN force)
 
BOOLEAN checkForked (void)
 
void initRandomPolling (void)
 
void endRandomPolling (void)
 

Macro Definition Documentation

#define DEBUG_CONFLICTS

Definition at line 19 of file unix.c.

#define DEVRANDOM_BYTES   128

Definition at line 1069 of file unix.c.

#define ENSURES_EXIT (   x)    if( !( x ) ) { assert( INTERNAL_ERROR ); exit( -1 ); }

Definition at line 163 of file unix.c.

#define lockPollingMutex ( )

Definition at line 149 of file unix.c.

#define RANDOM_BUFSIZE   4096

Definition at line 155 of file unix.c.

#define SC (   weight)    ( 1024 / weight ) /* Scale factor */

Definition at line 232 of file unix.c.

#define SC_0   16384 /* SC( SC_0 ) evalutes to 0 */

Definition at line 233 of file unix.c.

#define sched_yield ( )

Definition at line 1763 of file unix.c.

#define SHARED_BUFSIZE   49152 /* Usually about 25K are filled */

Definition at line 1574 of file unix.c.

#define SLOWPOLL_TIMEOUT   30 /* Time out after 30 seconds */

Definition at line 1313 of file unix.c.

#define unlockPollingMutex ( )

Definition at line 150 of file unix.c.

Function Documentation

BOOLEAN checkForked ( void  )

Definition at line 1937 of file unix.c.

void endRandomPolling ( void  )

Definition at line 1974 of file unix.c.

void fastPoll ( void  )

Definition at line 691 of file unix.c.

void initRandomPolling ( void  )

Definition at line 1959 of file unix.c.

void slowPoll ( void  )

Definition at line 1576 of file unix.c.

CHECK_RETVAL STDC_NONNULL_ARG ( (1)  )

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 487 of file unix.c.

CHECK_RETVAL STDC_NONNULL_ARG ( (1, 2)  )

Definition at line 646 of file unix.c.

CHECK_RETVAL STDC_NONNULL_ARG ( (1, 2, 4)  )

Definition at line 1224 of file unix.c.

CHECK_RETVAL int waitforRandomCompletion ( const BOOLEAN  force)

Definition at line 1777 of file unix.c.