Changeset 51dbadf3 in mainline for libc


Ignore:
Timestamp:
2006-06-06T07:42:20Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1890e312
Parents:
e9073f2
Message:

Added basic klog.
Added ipc tester.
TODO add serializing functions to psthread, so that the lines in klog won't intermix.

Location:
libc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/async.c

    re9073f2 r51dbadf3  
    139139
    140140static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
     141static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call);
    141142static async_client_conn_t client_connection = default_client_connection;
     143static async_client_conn_t interrupt_received = default_interrupt_received;
    142144
    143145/** Add microseconds to give timeval */
     
    342344        ipc_answer_fast(callid, ENOENT, 0, 0);
    343345}
    344 
    345 /** Function that gets called on interrupt receival
    346  *
    347  * This function is defined as a weak symbol - to be redefined in
    348  * user code.
    349  */
    350 void interrupt_received(ipc_call_t *call)
    351 {
    352 }
    353 
     346static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call)
     347{
     348}
    354349
    355350/** Wrapper for client connection thread
     
    441436        switch (IPC_GET_METHOD(*call)) {
    442437        case IPC_M_INTERRUPT:
    443                 interrupt_received(call);
     438                (*interrupt_received)(callid,call);
    444439                return;
    445440        case IPC_M_CONNECT_ME_TO:
     
    758753        client_connection = conn;
    759754}
     755void async_set_interrupt_received(async_client_conn_t conn)
     756{
     757        interrupt_received = conn;
     758}
  • libc/generic/time.c

    re9073f2 r51dbadf3  
    3535#include <atomic.h>
    3636#include <futex.h>
     37#include <ipc/services.h>
    3738
    3839#include <sysinfo.h>
     
    6869                /* Get the mapping of kernel clock */
    6970                res = ipc_call_sync_3(PHONE_NS, IPC_M_AS_AREA_RECV,
    70                                       mapping, PAGE_SIZE, 0,
     71                                      mapping, PAGE_SIZE, SERVICE_MEM_REALTIME,
    7172                                      NULL,&rights,NULL);
    7273                if (res) {
  • libc/include/async.h

    re9073f2 r51dbadf3  
    9999void async_destroy_manager(void);
    100100void async_set_client_connection(async_client_conn_t conn);
     101void async_set_interrupt_received(async_client_conn_t conn);
    101102int _async_init(void);
    102 
    103 /* Should be defined by application */
    104 void interrupt_received(ipc_call_t *call)  __attribute__((weak));
    105103
    106104
  • libc/include/ipc/services.h

    re9073f2 r51dbadf3  
    4242/* Memory area to be received from NS */
    4343#define SERVICE_MEM_REALTIME    1
     44#define SERVICE_MEM_KLOG        2
    4445
    4546#endif
Note: See TracChangeset for help on using the changeset viewer.