Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 1292 → Rev 1293

/kernel/trunk/generic/include/syscall/copy.h
37,13 → 37,13
/** Label within memcpy_to_uspace() that contains return -1. */
extern char memcpy_to_uspace_failover_address;
 
extern int copy_from_uspace(void *dst, void *uspace_src, size_t size);
extern int copy_to_uspace(void *dst_uspace, void *src, size_t size);
extern int copy_from_uspace(void *dst, const void *uspace_src, size_t size);
extern int copy_to_uspace(void *dst_uspace, const void *src, size_t size);
 
/*
* This interface must be implemented by each architecture.
*/
extern int memcpy_from_uspace(void *dst, void *uspace_src, size_t size);
extern int memcpy_to_uspace(void *uspace_dst, void *src, size_t size);
extern int memcpy_from_uspace(void *dst, const void *uspace_src, size_t size);
extern int memcpy_to_uspace(void *uspace_dst, const void *src, size_t size);
 
#endif
/kernel/trunk/generic/src/syscall/copy.c
54,7 → 54,7
*
* @return 0 on success or error code from @ref errno.h.
*/
int copy_from_uspace(void *dst, void *uspace_src, size_t size)
int copy_from_uspace(void *dst, const void *uspace_src, size_t size)
{
ipl_t ipl;
int rc;
95,7 → 95,7
*
* @return 0 on success or error code from @ref errno.h.
*/
int copy_to_uspace(void *uspace_dst, void *src, size_t size)
int copy_to_uspace(void *uspace_dst, const void *src, size_t size)
{
ipl_t ipl;
int rc;
/kernel/trunk/generic/src/syscall/syscall.c
43,6 → 43,7
#include <ipc/sysipc.h>
#include <synch/futex.h>
#include <ddi/ddi.h>
#include <syscall/copy.h>
 
static __native sys_io(int fd, const void * buf, size_t count) {
49,6 → 50,7
// TODO: buf sanity checks and a lot of other stuff ...
 
size_t i;
char str[10];
for (i = 0; i < count; i++)
putchar(((char *) buf)[i]);
/kernel/trunk/generic/src/ipc/sysipc.c
308,8 → 308,10
 
call = ipc_call_alloc(0);
rc = copy_from_uspace(&call->data.args, &data->args, sizeof(call->data.args));
if (rc != 0)
if (rc != 0) {
ipc_call_free(call);
return (__native) rc;
}
if (!(res=request_preprocess(call)))
ipc_call(phone, call);
else