/branches/tracing/uspace/app/tester/debug/debug1.def |
---|
0,0 → 1,6 |
{ |
"debug1", |
"Userspace debugging test", |
&test_debug1, |
true |
}, |
/branches/tracing/uspace/app/tester/debug/debug1.c |
---|
0,0 → 1,33 |
#include <stdio.h> |
#include <unistd.h> |
#include <ipc/ipc.h> |
#include "../tester.h" |
char * test_debug1(bool quiet) |
{ |
int taskid; |
int rc; |
int phoneid; |
int i; |
printf("running debug1 test\n"); |
taskid = 12; |
printf("ipc_connect_task(%d)...\n", taskid); |
rc = ipc_connect_task(taskid); |
printf("-> %d\n", rc); |
phoneid = rc; |
printf("send IPC_M_DEBUG_BEGIN message\n"); |
rc = ipc_call_sync_0_0(phoneid, IPC_M_DEBUG_BEGIN); |
printf("-> %d\n", rc); |
while (1) { |
printf("send IPC_M_DEBUG_GO message\n"); |
rc = ipc_call_sync_0_0(phoneid, IPC_M_DEBUG_GO); |
printf("-> %d\n", rc); |
} |
printf("done\n"); |
return NULL; |
} |
/branches/tracing/uspace/app/tester/tester.c |
---|
57,6 → 57,7 |
#include "ipc/hangup.def" |
#include "devmap/devmap1.def" |
#include "vfs/vfs1.def" |
#include "debug/debug1.def" |
{NULL, NULL, NULL} |
}; |
/branches/tracing/uspace/app/tester/tester.h |
---|
70,6 → 70,7 |
extern char * test_hangup(bool quiet); |
extern char * test_devmap1(bool quiet); |
extern char * test_vfs1(bool quiet); |
extern char * test_debug1(bool quiet); |
extern test_t tests[]; |
/branches/tracing/uspace/app/tester/Makefile |
---|
53,7 → 53,8 |
ipc/answer.c \ |
ipc/hangup.c \ |
devmap/devmap1.c \ |
vfs/vfs1.c |
vfs/vfs1.c \ |
debug/debug1.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
/branches/tracing/uspace/lib/libc/include/ipc/ipc.h |
---|
288,6 → 288,10 |
extern int ipc_data_write_receive(ipc_callid_t *callid, size_t *size); |
extern int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size); |
#include <task.h> |
extern int ipc_connect_task(task_id_t id); |
#endif |
/** @} |
/branches/tracing/uspace/lib/libc/generic/ipc.c |
---|
909,6 → 909,18 |
{ |
return ipc_answer_2(callid, EOK, (ipcarg_t) dst, (ipcarg_t) size); |
} |
#include <kernel/syscall/sysarg64.h> |
/** Connect to a task specified by id. |
*/ |
int ipc_connect_task(task_id_t id) |
{ |
sysarg64_t arg; |
arg.value = (unsigned long long) id; |
return __SYSCALL1(SYS_IPC_CONNECT_TASK, (sysarg_t) &arg); |
} |
/** @} |
*/ |