Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1489 → Rev 1490

/uspace/trunk/libc/generic/async.c
128,8 → 128,12
void (*cthread)(ipc_callid_t,ipc_call_t *);
} connection_t;
 
 
__thread connection_t *PS_connection;
 
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
static async_client_conn_t client_connection = default_client_connection;
 
/** Add microseconds to give timeval */
static void tv_add(struct timeval *tv, suseconds_t usecs)
{
272,7 → 276,7
* This function is defined as a weak symbol - to be redefined in
* user code.
*/
void client_connection(ipc_callid_t callid, ipc_call_t *call)
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call)
{
ipc_answer_fast(callid, ENOENT, 0, 0);
}
670,3 → 674,12
/* futex is up automatically after psthread_schedule_next...*/
free(msg);
}
 
/** Set function that is called, IPC_M_CONNECT_ME_TO is received
*
* @param conn Function that will form new psthread.
*/
void async_set_client_connection(async_client_conn_t conn)
{
client_connection = conn;
}
/uspace/trunk/libc/generic/io/stream.c
52,17 → 52,9
 
stream_t streams[FDS] = {{0, 0, 0}};
 
/*
ssize_t write_stdout(void *param, const void * buf, size_t count);
ssize_t write_stdout(void *param, const void * buf, size_t count)
{
return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
}*/
 
static ssize_t write_stderr(void *param, const void *buf, size_t count)
{
return count;
//return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
}
 
static ssize_t read_stdin(void *param, void *buf, size_t count)
77,7 → 69,6
((char *)buf)[i++] = r0;
}
return i;
//return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
}
 
static ssize_t write_stdout(void *param, const void *buf, size_t count)
89,7 → 80,6
ipc_call_sync_2(console_phone, CONSOLE_PUTCHAR, 0, ((const char *)buf)[i], &r0, &r1);
return count;
//return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
}