Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1596 → Rev 1595

/uspace/trunk/klog/klog.c
File deleted
/uspace/trunk/klog/Makefile
File deleted
/uspace/trunk/ipcc/Makefile
File deleted
/uspace/trunk/ipcc/ipcc.c
File deleted
/uspace/trunk/libc/include/ipc/services.h
41,6 → 41,5
 
/* Memory area to be received from NS */
#define SERVICE_MEM_REALTIME 1
#define SERVICE_MEM_KLOG 2
 
#endif
/uspace/trunk/libc/include/async.h
98,10 → 98,12
void async_create_manager(void);
void async_destroy_manager(void);
void async_set_client_connection(async_client_conn_t conn);
void async_set_interrupt_received(async_client_conn_t conn);
int _async_init(void);
 
/* Should be defined by application */
void interrupt_received(ipc_call_t *call) __attribute__((weak));
 
 
extern atomic_t async_futex;
 
#endif
/uspace/trunk/libc/generic/time.c
34,7 → 34,6
#include <unistd.h>
#include <atomic.h>
#include <futex.h>
#include <ipc/services.h>
 
#include <sysinfo.h>
#include <as.h>
68,7 → 67,7
mapping = as_get_mappable_page(PAGE_SIZE);
/* Get the mapping of kernel clock */
res = ipc_call_sync_3(PHONE_NS, IPC_M_AS_AREA_RECV,
mapping, PAGE_SIZE, SERVICE_MEM_REALTIME,
mapping, PAGE_SIZE, 0,
NULL,&rights,NULL);
if (res) {
printf("Failed to initialize timeofday memarea\n");
/uspace/trunk/libc/generic/async.c
138,9 → 138,7
__thread connection_t *PS_connection;
 
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call);
static async_client_conn_t client_connection = default_client_connection;
static async_client_conn_t interrupt_received = default_interrupt_received;
 
/** Add microseconds to give timeval */
static void tv_add(struct timeval *tv, suseconds_t usecs)
343,10 → 341,17
{
ipc_answer_fast(callid, ENOENT, 0, 0);
}
static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call)
 
/** Function that gets called on interrupt receival
*
* This function is defined as a weak symbol - to be redefined in
* user code.
*/
void interrupt_received(ipc_call_t *call)
{
}
 
 
/** Wrapper for client connection thread
*
* When new connection arrives, thread with this function is created.
435,7 → 440,7
/* Unrouted call - do some default behaviour */
switch (IPC_GET_METHOD(*call)) {
case IPC_M_INTERRUPT:
(*interrupt_received)(callid,call);
interrupt_received(call);
return;
case IPC_M_CONNECT_ME_TO:
/* Open new connection with thread etc. */
752,7 → 757,3
{
client_connection = conn;
}
void async_set_interrupt_received(async_client_conn_t conn)
{
interrupt_received = conn;
}
/uspace/trunk/ns/ns.c
33,7 → 33,6
 
#include <ipc/ipc.h>
#include <ipc/ns.h>
#include <ipc/services.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
77,23 → 76,21
 
int static ping_phone;
 
static void *clockaddr = NULL;
static void *klogaddr = NULL;
 
static void get_as(ipc_callid_t callid, ipc_call_t *call, char *name, void **addr)
static void get_realtime_as(ipc_callid_t callid, ipc_call_t *call)
{
static void *addr = NULL;
void *ph_addr;
 
if (!*addr) {
ph_addr = (void *)sysinfo_value(name);
if (!addr) {
ph_addr = (void *)sysinfo_value("clock.faddr");
if (!ph_addr) {
ipc_answer_fast(callid, ENOENT, 0, 0);
return;
}
*addr = as_get_mappable_page(PAGE_SIZE);
map_physmem(ph_addr, *addr, 1, AS_AREA_READ | AS_AREA_CACHEABLE);
addr = as_get_mappable_page(PAGE_SIZE);
map_physmem(ph_addr, addr, 1, AS_AREA_READ | AS_AREA_CACHEABLE);
}
ipc_answer_fast(callid, 0, (ipcarg_t)*addr, AS_AREA_READ);
ipc_answer_fast(callid, 0, (ipcarg_t)addr, AS_AREA_READ);
}
 
int main(int argc, char **argv)
112,16 → 109,7
callid = ipc_wait_for_call(&call);
switch (IPC_GET_METHOD(call)) {
case IPC_M_AS_AREA_RECV:
switch (IPC_GET_ARG3(call)) {
case SERVICE_MEM_REALTIME:
get_as(callid, &call, "clock.faddr", &clockaddr);
break;
case SERVICE_MEM_KLOG:
get_as(callid, &call, "klog.faddr", &klogaddr);
break;
default:
ipc_answer_fast(callid, ENOENT, 0, 0);
}
get_realtime_as(callid, &call);
continue;
case IPC_M_PHONE_HUNGUP:
retval = 0;
/uspace/trunk/Makefile
39,9 → 39,7
ns \
fb \
console \
tetris \
ipcc \
klog
tetris
 
ifeq ($(ARCH), amd64)
DIRS += pci \