Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/messages.h

    raadf01e r91478aa  
    120120/** The last network interface layer message.
    121121 */
    122 #define NET_NETIF_LAST          (NET_NETIF_FIRST + NET_NETIF_COUNT)
     122#define NET_NETIF_LAST          ( NET_NETIF_FIRST + NET_NETIF_COUNT )
    123123
    124124/** The first general networking message.
    125125 */
    126 #define NET_NET_FIRST           (NET_NETIF_LAST + 0)
     126#define NET_NET_FIRST           ( NET_NETIF_LAST + 0 )
    127127
    128128/** The last general networking message.
    129129 */
    130 #define NET_NET_LAST            (NET_NET_FIRST + NET_NET_COUNT)
     130#define NET_NET_LAST            ( NET_NET_FIRST + NET_NET_COUNT )
    131131
    132132/** The first network interface layer message.
    133133 */
    134 #define NET_NIL_FIRST           (NET_NET_LAST + 0)
     134#define NET_NIL_FIRST           ( NET_NET_LAST + 0 )
    135135
    136136/** The last network interface layer message.
    137137 */
    138 #define NET_NIL_LAST            (NET_NIL_FIRST + NET_NIL_COUNT)
     138#define NET_NIL_LAST            ( NET_NIL_FIRST + NET_NIL_COUNT )
    139139
    140140/** The first Ethernet message.
    141141 */
    142 #define NET_ETH_FIRST           (NET_NIL_LAST + 0)
     142#define NET_ETH_FIRST           ( NET_NIL_LAST + 0 )
    143143
    144144/** The last Ethernet message.
    145145 */
    146 #define NET_ETH_LAST            (NET_ETH_FIRST + NET_ETH_COUNT)
     146#define NET_ETH_LAST            ( NET_ETH_FIRST + NET_ETH_COUNT )
    147147
    148148/** The first inter-network message.
    149149 */
    150 #define NET_IL_FIRST            (NET_ETH_LAST + 0)
     150#define NET_IL_FIRST            ( NET_ETH_LAST + 0 )
    151151
    152152/** The last inter-network message.
    153153 */
    154 #define NET_IL_LAST                     (NET_IL_FIRST + NET_IL_COUNT)
     154#define NET_IL_LAST                     ( NET_IL_FIRST + NET_IL_COUNT )
    155155
    156156/** The first IP message.
    157157 */
    158 #define NET_IP_FIRST            (NET_IL_LAST + 0)
     158#define NET_IP_FIRST            ( NET_IL_LAST + 0 )
    159159
    160160/** The last IP message.
    161161 */
    162 #define NET_IP_LAST                     (NET_IP_FIRST + NET_IP_COUNT)
     162#define NET_IP_LAST                     ( NET_IP_FIRST + NET_IP_COUNT )
    163163
    164164/** The first ARP message.
    165165 */
    166 #define NET_ARP_FIRST           (NET_IP_LAST + 0)
     166#define NET_ARP_FIRST           ( NET_IP_LAST + 0 )
    167167
    168168/** The last ARP message.
    169169 */
    170 #define NET_ARP_LAST            (NET_ARP_FIRST + NET_ARP_COUNT)
     170#define NET_ARP_LAST            ( NET_ARP_FIRST + NET_ARP_COUNT )
    171171
    172172/** The first ICMP message.
    173173 */
    174 #define NET_ICMP_FIRST          (NET_ARP_LAST + 0)
     174#define NET_ICMP_FIRST          ( NET_ARP_LAST + 0 )
    175175
    176176/** The last ICMP message.
    177177 */
    178 #define NET_ICMP_LAST           (NET_ICMP_FIRST + NET_ICMP_COUNT)
     178#define NET_ICMP_LAST           ( NET_ICMP_FIRST + NET_ICMP_COUNT )
    179179
    180180/** The first ICMP message.
    181181 */
    182 #define NET_TL_FIRST            (NET_ICMP_LAST + 0)
     182#define NET_TL_FIRST            ( NET_ICMP_LAST + 0 )
    183183
    184184/** The last ICMP message.
    185185 */
    186 #define NET_TL_LAST                     (NET_TL_FIRST + NET_TL_COUNT)
     186#define NET_TL_LAST                     ( NET_TL_FIRST + NET_TL_COUNT )
    187187
    188188/** The first UDP message.
    189189 */
    190 #define NET_UDP_FIRST           (NET_TL_LAST + 0)
     190#define NET_UDP_FIRST           ( NET_TL_LAST + 0 )
    191191
    192192/** The last UDP message.
    193193 */
    194 #define NET_UDP_LAST            (NET_UDP_FIRST + NET_UDP_COUNT)
     194#define NET_UDP_LAST            ( NET_UDP_FIRST + NET_UDP_COUNT )
    195195
    196196/** The first TCP message.
    197197 */
    198 #define NET_TCP_FIRST           (NET_UDP_LAST + 0)
     198#define NET_TCP_FIRST           ( NET_UDP_LAST + 0 )
    199199
    200200/** The last TCP message.
    201201 */
    202 #define NET_TCP_LAST            (NET_TCP_FIRST + NET_TCP_COUNT)
     202#define NET_TCP_LAST            ( NET_TCP_FIRST + NET_TCP_COUNT )
    203203
    204204/** The first socket message.
    205205 */
    206 #define NET_SOCKET_FIRST        (NET_TCP_LAST + 0)
     206#define NET_SOCKET_FIRST        ( NET_TCP_LAST + 0 )
    207207
    208208/** The last socket message.
    209209 */
    210 #define NET_SOCKET_LAST         (NET_SOCKET_FIRST + NET_SOCKET_COUNT)
     210#define NET_SOCKET_LAST         ( NET_SOCKET_FIRST + NET_SOCKET_COUNT )
    211211
    212212/** The first packet management system message.
    213213 */
    214 #define NET_PACKET_FIRST        (NET_SOCKET_LAST + 0)
     214#define NET_PACKET_FIRST        ( NET_SOCKET_LAST + 0 )
    215215
    216216/** The last packet management system message.
    217217 */
    218 #define NET_PACKET_LAST         (NET_PACKET_FIRST + NET_PACKET_COUNT)
     218#define NET_PACKET_LAST         ( NET_PACKET_FIRST + NET_PACKET_COUNT )
    219219
    220220/** The last networking message.
     
    224224/** The number of networking messages.
    225225 */
    226 #define NET_COUNT                       (NET_LAST - NET_FIRST)
     226#define NET_COUNT                       ( NET_LAST - NET_FIRST )
    227227
    228228/** Returns a value indicating whether the value is in the interval.
     
    231231 *  @param[in] last_exclusive The first value after the interval.
    232232 */
    233 #define IS_IN_INTERVAL(item, first_inclusive, last_exclusive)   (((item) >= (first_inclusive)) && ((item) < (last_exclusive)))
     233#define IS_IN_INTERVAL( item, first_inclusive, last_exclusive ) ((( item ) >= ( first_inclusive )) && (( item ) < ( last_exclusive )))
    234234
    235235/** Returns a value indicating whether the IPC call is a generic networking message.
    236236 *  @param[in] call The IPC call to be checked.
    237237 */
    238 #define IS_NET_MESSAGE(call)                    IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST)
     238#define IS_NET_MESSAGE( call )                  IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_FIRST, NET_LAST )
    239239
    240240/** Returns a value indicating whether the IPC call is a generic networking message.
    241241 *  @param[in] call The IPC call to be checked.
    242242 */
    243 #define IS_NET_NET_MESSAGE(call)                IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST)
     243#define IS_NET_NET_MESSAGE( call )              IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_NET_FIRST, NET_NET_LAST )
    244244
    245245/** Returns a value indicating whether the IPC call is a network interface layer message.
    246246 *  @param[in] call The IPC call to be checked.
    247247 */
    248 #define IS_NET_NIL_MESSAGE(call)                IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST)
     248#define IS_NET_NIL_MESSAGE( call )              IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_NIL_FIRST, NET_NIL_LAST )
    249249
    250250/** Returns a value indicating whether the IPC call is an Ethernet message.
    251251 *  @param[in] call The IPC call to be checked.
    252252 */
    253 #define IS_NET_ETH_MESSAGE(call)                IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST)
     253#define IS_NET_ETH_MESSAGE( call )              IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ETH_FIRST, NET_ETH_LAST )
    254254
    255255/** Returns a value indicating whether the IPC call is an inter-network layer message.
    256256 *  @param[in] call The IPC call to be checked.
    257257 */
    258 #define IS_NET_IL_MESSAGE(call)         IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST)
     258#define IS_NET_IL_MESSAGE( call )               IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_IL_FIRST, NET_IL_LAST )
    259259
    260260/** Returns a value indicating whether the IPC call is an IP message.
    261261 *  @param[in] call The IPC call to be checked.
    262262 */
    263 #define IS_NET_IP_MESSAGE(call)         IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST)
     263#define IS_NET_IP_MESSAGE( call )               IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_IP_FIRST, NET_IP_LAST )
    264264
    265265/** Returns a value indicating whether the IPC call is an ARP message.
    266266 *  @param[in] call The IPC call to be checked.
    267267 */
    268 #define IS_NET_ARP_MESSAGE(call)                IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST)
     268#define IS_NET_ARP_MESSAGE( call )              IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ARP_FIRST, NET_ARP_LAST )
    269269
    270270/** Returns a value indicating whether the IPC call is an ICMP message.
    271271 *  @param[in] call The IPC call to be checked.
    272272 */
    273 #define IS_NET_ICMP_MESSAGE(call)               IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST)
     273#define IS_NET_ICMP_MESSAGE( call )             IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ICMP_FIRST, NET_ICMP_LAST )
    274274
    275275/** Returns a value indicating whether the IPC call is a transport layer message.
    276276 *  @param[in] call The IPC call to be checked.
    277277 */
    278 #define IS_NET_TL_MESSAGE(call)         IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST)
     278#define IS_NET_TL_MESSAGE( call )               IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_TL_FIRST, NET_TL_LAST )
    279279
    280280/** Returns a value indicating whether the IPC call is a UDP message.
    281281 *  @param[in] call The IPC call to be checked.
    282282 */
    283 #define IS_NET_UDP_MESSAGE(call)                IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST)
     283#define IS_NET_UDP_MESSAGE( call )              IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_UDP_FIRST, NET_UDP_LAST )
    284284
    285285/** Returns a value indicating whether the IPC call is a TCP message.
    286286 *  @param[in] call The IPC call to be checked.
    287287 */
    288 #define IS_NET_TCP_MESSAGE(call)                IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST)
     288#define IS_NET_TCP_MESSAGE( call )              IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_TCP_FIRST, NET_TCP_LAST )
    289289
    290290/** Returns a value indicating whether the IPC call is a socket message.
    291291 *  @param[in] call The IPC call to be checked.
    292292 */
    293 #define IS_NET_SOCKET_MESSAGE(call)     IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST)
     293#define IS_NET_SOCKET_MESSAGE( call )   IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_SOCKET_FIRST, NET_SOCKET_LAST )
    294294
    295295/** Returns a value indicating whether the IPC call is a packet manaagement system message.
    296296 *  @param[in] call The IPC call to be checked.
    297297 */
    298 #define IS_NET_PACKET_MESSAGE(call)     IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST)
     298#define IS_NET_PACKET_MESSAGE( call )   IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_PACKET_FIRST, NET_PACKET_LAST )
    299299
    300300/*@}*/
     
    307307 *  @param[in] call The message call structure.
    308308 */
    309 #define IPC_GET_DEVICE(call)            (device_id_t) IPC_GET_ARG1(*call)
     309#define IPC_GET_DEVICE( call )          ( device_id_t ) IPC_GET_ARG1( * call )
    310310
    311311/** Returns the packet identifier message parameter.
    312312 *  @param[in] call The message call structure.
    313313 */
    314 #define IPC_GET_PACKET(call)            (packet_id_t) IPC_GET_ARG2(*call)
     314#define IPC_GET_PACKET( call )          ( packet_id_t ) IPC_GET_ARG2( * call )
    315315
    316316/** Returns the count message parameter.
    317317 *  @param[in] call The message call structure.
    318318 */
    319 #define IPC_GET_COUNT(call)             (size_t) IPC_GET_ARG2(*call)
     319#define IPC_GET_COUNT( call )           ( size_t ) IPC_GET_ARG2( * call )
    320320
    321321/** Returns the device state message parameter.
    322322 *  @param[in] call The message call structure.
    323323 */
    324 #define IPC_GET_STATE(call)             (device_state_t) IPC_GET_ARG2(*call)
     324#define IPC_GET_STATE( call )           ( device_state_t ) IPC_GET_ARG2( * call )
    325325
    326326/** Returns the maximum transmission unit message parameter.
    327327 *  @param[in] call The message call structure.
    328328 */
    329 #define IPC_GET_MTU(call)                       (size_t) IPC_GET_ARG2(*call)
     329#define IPC_GET_MTU( call )                     ( size_t ) IPC_GET_ARG2( * call )
    330330
    331331/** Returns the device driver service message parameter.
    332332 *  @param[in] call The message call structure.
    333333 */
    334 #define IPC_GET_SERVICE(call)           (services_t) IPC_GET_ARG3(*call)
     334#define IPC_GET_SERVICE( call )         ( services_t ) IPC_GET_ARG3( * call )
    335335
    336336/** Returns the target service message parameter.
    337337 *  @param[in] call The message call structure.
    338338 */
    339 #define IPC_GET_TARGET(call)            (services_t) IPC_GET_ARG3(*call)
     339#define IPC_GET_TARGET( call )          ( services_t ) IPC_GET_ARG3( * call )
    340340
    341341/** Returns the sender service message parameter.
    342342 *  @param[in] call The message call structure.
    343343 */
    344 #define IPC_GET_SENDER(call)            (services_t) IPC_GET_ARG3(*call)
     344#define IPC_GET_SENDER( call )          ( services_t ) IPC_GET_ARG3( * call )
    345345
    346346/** Returns the error service message parameter.
    347347 *  @param[in] call The message call structure.
    348348 */
    349 #define IPC_GET_ERROR(call)             (services_t) IPC_GET_ARG4(*call)
     349#define IPC_GET_ERROR( call )           ( services_t ) IPC_GET_ARG4( * call )
    350350
    351351/** Returns the phone message parameter.
    352352 *  @param[in] call The message call structure.
    353353 */
    354 #define IPC_GET_PHONE(call)             (int) IPC_GET_ARG5(*call)
     354#define IPC_GET_PHONE( call )           ( int ) IPC_GET_ARG5( * call )
    355355
    356356/** Sets the device identifier in the message answer.
    357357 *  @param[out] answer The message answer structure.
    358358 */
    359 #define IPC_SET_DEVICE(answer)  ((device_id_t *) &IPC_GET_ARG1(*answer))
     359#define IPC_SET_DEVICE( answer )        (( device_id_t * ) & IPC_GET_ARG1( * answer ))
    360360
    361361/** Sets the minimum address length in the message answer.
    362362 *  @param[out] answer The message answer structure.
    363363 */
    364 #define IPC_SET_ADDR(answer)            ((size_t *) &IPC_GET_ARG1(*answer))
     364#define IPC_SET_ADDR( answer )          (( size_t * ) & IPC_GET_ARG1( * answer ))
    365365
    366366/** Sets the minimum prefix size in the message answer.
    367367 *  @param[out] answer The message answer structure.
    368368 */
    369 #define IPC_SET_PREFIX(answer)  ((size_t *) &IPC_GET_ARG2(*answer))
     369#define IPC_SET_PREFIX( answer )        (( size_t * ) & IPC_GET_ARG2( * answer ))
    370370
    371371/** Sets the maximum content size in the message answer.
    372372 *  @param[out] answer The message answer structure.
    373373 */
    374 #define IPC_SET_CONTENT(answer) ((size_t *) &IPC_GET_ARG3(*answer))
     374#define IPC_SET_CONTENT( answer )       (( size_t * ) & IPC_GET_ARG3( * answer ))
    375375
    376376/** Sets the minimum suffix size in the message answer.
    377377 *  @param[out] answer The message answer structure.
    378378 */
    379 #define IPC_SET_SUFFIX(answer)  ((size_t *) &IPC_GET_ARG4(*answer))
     379#define IPC_SET_SUFFIX( answer )        (( size_t * ) & IPC_GET_ARG4( * answer ))
    380380
    381381/*@}*/
     
    391391 *  @returns Other error codes as defined for the specific service message.
    392392 */
    393 static inline int generic_get_addr_req(int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data){
    394         aid_t message_id;
    395         ipcarg_t result;
    396         int string;
    397 
    398         if(!(address && data)){
    399                 return EBADMEM;
     393static inline int generic_get_addr_req( int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data ){
     394        aid_t                   message_id;
     395        ipcarg_t                result;
     396        int                             string;
     397
     398        if( !( address && data )) return EBADMEM;
     399        message_id = async_send_1( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, NULL );
     400        string = measured_strings_return( phone, address, data, 1 );
     401        async_wait_for( message_id, & result );
     402        if(( string == EOK ) && ( result != EOK )){
     403                free( * address );
     404                free( * data );
    400405        }
    401         message_id = async_send_1(phone, (ipcarg_t) message, (ipcarg_t) device_id, NULL);
    402         string = measured_strings_return(phone, address, data, 1);
    403         async_wait_for(message_id, &result);
    404         if((string == EOK) && (result != EOK)){
    405                 free(*address);
    406                 free(*data);
    407         }
    408         return (int) result;
     406        return ( int ) result;
    409407}
    410408
     
    425423 *  @returns Other error codes as defined for the specific service message.
    426424 */
    427 static inline int generic_translate_req(int phone, int message, device_id_t device_id, services_t service, measured_string_ref configuration, size_t count, measured_string_ref * translation, char ** data){
    428         aid_t message_id;
    429         ipcarg_t result;
    430         int string;
    431 
    432         if(!(configuration && (count > 0))){
    433                 return EINVAL;
     425static inline int       generic_translate_req( int phone, int message, device_id_t device_id, services_t service, measured_string_ref configuration, size_t count, measured_string_ref * translation, char ** data ){
     426        aid_t                   message_id;
     427        ipcarg_t                result;
     428        int                             string;
     429
     430        if( !( configuration && ( count > 0 ))) return EINVAL;
     431        if( !( translation && data )) return EBADMEM;
     432        message_id = async_send_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) count, ( ipcarg_t ) service, NULL );
     433        measured_strings_send( phone, configuration, count );
     434        string = measured_strings_return( phone, translation, data, count );
     435        async_wait_for( message_id, & result );
     436        if(( string == EOK ) && ( result != EOK )){
     437                free( * translation );
     438                free( * data );
    434439        }
    435         if(!(translation && data)){
    436                 return EBADMEM;
    437         }
    438         message_id = async_send_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) count, (ipcarg_t) service, NULL);
    439         measured_strings_send(phone, configuration, count);
    440         string = measured_strings_return(phone, translation, data, count);
    441         async_wait_for(message_id, &result);
    442         if((string == EOK) && (result != EOK)){
    443                 free(*translation);
    444                 free(*data);
    445         }
    446         return (int) result;
     440        return ( int ) result;
    447441}
    448442
     
    456450 *  @returns EOK on success.
    457451 */
    458 static inline int generic_send_msg(int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t sender, services_t error){
    459         if(error){
    460                 async_msg_4(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) sender, (ipcarg_t) error);
     452static inline int       generic_send_msg( int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t sender, services_t error ){
     453        if( error ){
     454                async_msg_4( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) sender, ( ipcarg_t ) error );
    461455        }else{
    462                 async_msg_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) sender);
     456                async_msg_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) sender );
    463457        }
    464458        return EOK;
     
    474468 *  @returns Other error codes as defined for the specific service message.
    475469 */
    476 static inline int generic_packet_size_req(int phone, int message, device_id_t device_id, packet_dimension_ref packet_dimension){
    477         ipcarg_t result;
    478         ipcarg_t prefix;
    479         ipcarg_t content;
    480         ipcarg_t suffix;
    481         ipcarg_t addr_len;
    482 
    483         if(! packet_dimension){
    484                 return EBADMEM;
    485         }
    486         result = async_req_1_4(phone, (ipcarg_t) message, (ipcarg_t) device_id, &addr_len, &prefix, &content, &suffix);
    487         packet_dimension->prefix = (size_t) prefix;
    488         packet_dimension->content = (size_t) content;
    489         packet_dimension->suffix = (size_t) suffix;
    490         packet_dimension->addr_len = (size_t) addr_len;
    491         return (int) result;
     470static inline int       generic_packet_size_req( int phone, int message, device_id_t device_id, packet_dimension_ref packet_dimension ){
     471        ipcarg_t        result;
     472        ipcarg_t        prefix;
     473        ipcarg_t        content;
     474        ipcarg_t        suffix;
     475        ipcarg_t        addr_len;
     476
     477        if( ! packet_dimension ) return EBADMEM;
     478        result = async_req_1_4( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, & addr_len, & prefix, & content, & suffix );
     479        packet_dimension->prefix = ( size_t ) prefix;
     480        packet_dimension->content = ( size_t ) content;
     481        packet_dimension->suffix = ( size_t ) suffix;
     482        packet_dimension->addr_len = ( size_t ) addr_len;
     483        return ( int ) result;
    492484}
    493485
     
    500492 *  @returns EOK on success.
    501493 */
    502 static inline int generic_device_state_msg(int phone, int message, device_id_t device_id, int state, services_t target){
    503         async_msg_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) state, target);
     494static inline int       generic_device_state_msg( int phone, int message, device_id_t device_id, int state, services_t target ){
     495        async_msg_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) state, target );
    504496        return EOK;
    505497}
     
    514506 *  @returns EOK on success.
    515507 */
    516 static inline int generic_received_msg(int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t target, services_t error){
    517         if(error){
    518                 async_msg_4(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) target, (ipcarg_t) error);
     508static inline int       generic_received_msg( int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t target, services_t error ){
     509        if( error ){
     510                async_msg_4( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) target, ( ipcarg_t ) error );
    519511        }else{
    520                 async_msg_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) target);
     512                async_msg_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) target );
    521513        }
    522514        return EOK;
     
    532524 *  @returns Other error codes as defined for the specific service message.
    533525 */
    534 static inline int generic_device_req(int phone, int message, device_id_t device_id, int arg2, services_t service){
    535         return (int) async_req_3_0(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) arg2, (ipcarg_t) service);
     526static inline int       generic_device_req( int phone, int message, device_id_t device_id, int arg2, services_t service ){
     527        return ( int ) async_req_3_0( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) arg2, ( ipcarg_t ) service );
    536528}
    537529
Note: See TracChangeset for help on using the changeset viewer.