logserver.c File Reference

Log-Server main. More...

Go to the source code of this file.

Defines

#define min(a, b)   ((a)<(b)?(a):(b))

Functions

static void init_buffer (void)
static void print_buffered (const char *data)
static void parse_args (int argc, const char **argv)
void log_outstring_component (CORBA_Object _dice_corba_obj, int flush_flag, const char *str, CORBA_Server_Environment *_dice_corba_env)
int log_channel_open_component (CORBA_Object _dice_corba_obj, l4_snd_fpage_t page, int channel, CORBA_Server_Environment *_dice_corba_env)
int log_channel_write_component (CORBA_Object _dice_corba_obj, int channel, unsigned int offset, unsigned int size, CORBA_Server_Environment *_dice_corba_env)
int log_channel_flush_component (CORBA_Object _dice_corba_obj, int channel, CORBA_Server_Environment *_dice_corba_env)
int log_channel_close_component (CORBA_Object _dice_corba_obj, int channel, CORBA_Server_Environment *_dice_corba_env)
static void * msg_alloc (unsigned long size)
int main (int argc, const char **argv)

Variables

int verbose = 0
unsigned buffer_size
unsigned buffer_head
unsigned buffer_tail
static char message_buffer [LOG_BUFFERSIZE+5]
 A string-buffer containing the received string.
char LOG_tag [9] = "log"
 Our own logstring.
int flush_local = 1
int flush_serial
int serial_esc
int prio = 0x20
char buffer_array [OUTPUT_BUFFER_SIZE]


Detailed Description

Log-Server main.

Date:
03/02/2001
Author:
Jork Loeser <jork.loeser@inf.tu-dresden.de>
Buffering issues: We allow buffering of output to speed up logging.

Currently, we do not deal with dynamic memory allocation, we use a static array, allocated at compile-time. What would be the use of dynamic allocation? As of today (03/01/2001), malloc() uses a pre-allocated memory area, allocated from simple-dm prior to the start of main(). So, this memory would be allocated anyway. Thus we save the effort and use the static array.

Definition in file logserver.c.


Variable Documentation

char LOG_tag[9] = "log"

Our own logstring.

Symbol defining the logtag.

Definition at line 55 of file logserver.c.


Generated on Wed Apr 11 06:40:52 2012 for Logging and output facility for DROPS by  doxygen 1.5.6