copy.h File Reference

#include <libc.h>

Go to the source code of this file.

Defines

#define __SYSINTERF_COPY_H__   1

Functions

int copy (pid_t from_pid, char *from_buf, pid_t to_pid, char *to_buf, size_t len)
int copyinstr (pid_t from_pid, char *from_str, char *to_str, size_t max_len)
int ascopy (asid_t from_asid, char *from_buf, asid_t to_asid, char *to_buf, size_t len)


Define Documentation

#define __SYSINTERF_COPY_H__   1
 


Function Documentation

int ascopy asid_t  from_asid,
char *  from_buf,
asid_t  to_asid,
char *  to_buf,
size_t  len
 

int copy pid_t  from_pid,
char *  from_buf,
pid_t  to_pid,
char *  to_buf,
size_t  len
 

Copies bytes from one process to another. Don't forget that as in any string manipulating function, the buffer that shall receive the copy *MUST* be allocated with a size of <len>.

Parameters:
from_pid The pid of the process we want to read from.
from_buf The pointer to the data we want to copy.
to_pid The pid of the process we want to write to. Generally, you'll want to put -1 to write to your own process.
to_buf The pointer to the zone we want to copy to.
len The number of bytes we want to copy.
Returns:
The number of bytes copied, or -1 if a problem happened.

int copyinstr pid_t  from_pid,
char *  from_str,
char *  to_str,
size_t  max_len
 

copy max_len bytes from from_pid's aspace. A final 0 is automatically appended, for this to work, to_str must have a length of max_len+1.


Generated on Wed May 24 23:05:58 2006 for LSE/OS by  doxygen 1.4.6