Changeset ca3ba3a in mainline


Ignore:
Timestamp:
2009-06-03T19:21:04Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2595dab
Parents:
76d0d284
Message:

sync header files with implementation
coding style

Location:
uspace/lib/libc/include/ipc
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/include/ipc/console.h

    r76d0d284 rca3ba3a  
    2828
    2929/** @addtogroup libcipc
    30  * @{ 
     30 * @{
    3131 */
    3232/** @file
     
    3737
    3838#include <ipc/ipc.h>
     39#include <ipc/vfs.h>
    3940
    4041typedef enum {
    41         CONSOLE_GETKEY = IPC_FIRST_USER_METHOD,
    42         CONSOLE_PUTCHAR,
    43         CONSOLE_WRITE,
     42        CONSOLE_GET_SIZE = VFS_LAST_SRV,
     43        CONSOLE_GET_EVENT,
     44        CONSOLE_GOTO,
    4445        CONSOLE_CLEAR,
    45         CONSOLE_GOTO,
    46         CONSOLE_GETSIZE,
    47         CONSOLE_FLUSH,
    4846        CONSOLE_SET_STYLE,
    4947        CONSOLE_SET_COLOR,
     
    5452
    5553#endif
    56  
     54
    5755/** @}
    5856 */
  • uspace/lib/libc/include/ipc/ipc.h

    r76d0d284 rca3ba3a  
    3131 */
    3232/** @file
    33  */ 
     33 */
    3434
    3535#ifndef LIBIPC_IPC_H_
    3636#define LIBIPC_IPC_H_
    3737
     38#include <task.h>
    3839#include <kernel/ipc/ipc.h>
    3940#include <kernel/ddi/irq.h>
     
    4142#include <kernel/synch/synch.h>
    4243
     44#define IPC_FLAG_BLOCKING  0x01
     45
    4346typedef sysarg_t ipcarg_t;
     47
    4448typedef struct {
    4549        ipcarg_t args[IPC_CALL_LEN];
    4650        ipcarg_t in_phone_hash;
    4751} ipc_call_t;
     52
    4853typedef sysarg_t ipc_callid_t;
    4954
     
    5762 */
    5863#define ipc_call_sync_0_0(phoneid, method) \
    59     ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)
     64        ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)
    6065#define ipc_call_sync_0_1(phoneid, method, res1) \
    61     ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)
     66        ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)
    6267#define ipc_call_sync_0_2(phoneid, method, res1, res2) \
    63     ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)
     68        ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)
    6469#define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \
    65     ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
    66         0, 0)
     70        ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
     71            0, 0)
    6772#define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \
    68     ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
    69         (res4), 0)
     73        ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
     74            (res4), 0)
    7075#define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \
    71     ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
    72         (res4), (res5))
     76        ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
     77            (res4), (res5))
     78
    7379#define ipc_call_sync_1_0(phoneid, method, arg1) \
    74     ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)
     80        ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)
    7581#define ipc_call_sync_1_1(phoneid, method, arg1, res1) \
    76     ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)
     82        ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)
    7783#define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \
    78     ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \
    79         0, 0)
     84        ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \
     85            0, 0)
    8086#define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \
    81     ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
    82         (res3), 0, 0)
     87        ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
     88            (res3), 0, 0)
    8389#define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \
    84     ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
    85         (res3), (res4), 0)
     90        ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
     91            (res3), (res4), 0)
    8692#define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \
    8793    res5) \
    8894        ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
    8995            (res3), (res4), (res5))
     96
    9097#define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \
    91     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \
    92         0, 0)
     98        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \
     99            0, 0)
    93100#define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \
    94     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \
    95         0, 0)
     101        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \
     102            0, 0)
    96103#define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \
    97     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
    98         (res2), 0, 0, 0)
     104        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
     105            (res2), 0, 0, 0)
    99106#define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \
    100     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
    101         (res2), (res3), 0, 0)
     107        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
     108            (res2), (res3), 0, 0)
    102109#define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \
    103110    res4) \
     
    108115        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
    109116            (res2), (res3), (res4), (res5))
     117
    110118#define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \
    111     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \
    112     0, 0)
     119        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \
     120            0, 0)
    113121#define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \
    114     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
    115         0, 0, 0, 0)
     122        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
     123            0, 0, 0, 0)
    116124#define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \
    117     ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
    118         (res2), 0, 0, 0)
     125        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
     126            (res2), 0, 0, 0)
    119127#define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \
    120128    res3) \
     
    129137        ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
    130138            (res1), (res2), (res3), (res4), (res5))
     139
    131140#define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
    132     ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
    133         0, 0, 0, 0, 0)
     141        ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
     142            0, 0, 0, 0, 0)
    134143#define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \
    135     ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
    136         (res1), 0, 0, 0, 0)
     144        ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
     145            (res1), 0, 0, 0, 0)
    137146#define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \
    138     ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
    139         (res1), (res2), 0, 0, 0)
     147        ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
     148            (res1), (res2), 0, 0, 0)
    140149#define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
    141150    res3) \
     
    150159        ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
    151160            (arg4), 0, (res1), (res2), (res3), (res4), (res5))
     161
    152162#define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
    153     ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
    154         (arg5), 0, 0, 0, 0, 0)
     163        ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
     164            (arg5), 0, 0, 0, 0, 0)
    155165#define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \
    156     ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
    157         (arg5), (res1), 0, 0, 0, 0)
     166        ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
     167            (arg5), (res1), 0, 0, 0, 0)
    158168#define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
    159169    res2) \
     
    182192extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int);
    183193extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t);
     194
    184195static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data)
    185196{
    186197        return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT);
    187198}
     199
    188200extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *);
    189201
     
    195207 */
    196208#define ipc_answer_0(callid, retval) \
    197     ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
     209        ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
    198210#define ipc_answer_1(callid, retval, arg1) \
    199     ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
     211        ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
    200212#define ipc_answer_2(callid, retval, arg1, arg2) \
    201     ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
     213        ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
    202214#define ipc_answer_3(callid, retval, arg1, arg2, arg3) \
    203     ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
     215        ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
    204216#define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \
    205     ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
     217        ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
    206218#define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \
    207     ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
     219        ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
    208220
    209221extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
     
    247259    ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int);
    248260
    249 #define IPC_FLAG_BLOCKING  0x01
    250 
    251261extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *);
    252262extern int ipc_connect_me_to(int, int, int, int);
     
    257267extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int);
    258268extern int ipc_forward_slow(ipc_callid_t, int, int, ipcarg_t, ipcarg_t,
    259     ipcarg_t, ipcarg_t, ipcarg_t, int);
    260 
     269    ipcarg_t, ipcarg_t, ipcarg_t, int);
    261270
    262271/*
     
    264273 */
    265274#define ipc_share_in_start_0_0(phoneid, dst, size) \
    266     ipc_share_in_start((phoneid), (dst), (size), 0, NULL)
     275        ipc_share_in_start((phoneid), (dst), (size), 0, NULL)
    267276#define ipc_share_in_start_0_1(phoneid, dst, size, flags) \
    268     ipc_share_in_start((phoneid), (dst), (size), 0, (flags))
     277        ipc_share_in_start((phoneid), (dst), (size), 0, (flags))
    269278#define ipc_share_in_start_1_0(phoneid, dst, size, arg) \
    270     ipc_share_in_start((phoneid), (dst), (size), (arg), NULL)
     279        ipc_share_in_start((phoneid), (dst), (size), (arg), NULL)
    271280#define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \
    272     ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
     281        ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
    273282
    274283extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *);
     
    285294extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);
    286295
    287 #include <task.h>
    288 
    289296extern int ipc_connect_kbox(task_id_t);
    290297
  • uspace/lib/libc/include/ipc/loader.h

    r76d0d284 rca3ba3a  
    4343        LOADER_SET_PATHNAME,
    4444        LOADER_SET_ARGS,
     45        LOADER_SET_FILES,
    4546        LOADER_LOAD,
    4647        LOADER_RUN
  • uspace/lib/libc/include/ipc/ns.h

    r76d0d284 rca3ba3a  
    3636#define LIBIPC_NS_H_
    3737
     38#include <ipc/ipc.h>
     39
     40typedef enum {
     41        NS_PING = IPC_FIRST_USER_METHOD,
     42        NS_TASK_WAIT
     43} ns_request_t;
     44
    3845#endif
    3946
Note: See TracChangeset for help on using the changeset viewer.