Changeset 8c193d83 in mainline for abi/include/abi/ipc/methods.h


Ignore:
Timestamp:
2019-02-23T17:47:52Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Parents:
ab87db5
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-11 15:28:25)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-23 17:47:52)
Message:

Convert preprocessor macros in abi/ to C constructs

Preprocessor macros are an obsolete concept and they complicate things.
They are also completely unnecessary in most circumstances.

This commit changes untyped numeric constants into anonymous enums,
typed constants into static const variables, and function-like macros
into functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/ipc/methods.h

    rab87db5 r8c193d83  
    3939
    4040/* Well known phone descriptors */
    41 #define PHONE_NS  ((cap_phone_handle_t) (CAP_NIL + 1))
     41static cap_phone_handle_t const PHONE_NS = (cap_phone_handle_t) (CAP_NIL + 1);
    4242
    4343/** Kernel IPC interfaces
    4444 *
    4545 */
    46 #define IPC_IF_KERNEL  0
     46enum {
     47        IPC_IF_KERNEL = 0,
     48};
    4749
    4850/** System-specific IPC methods
     
    5254 *
    5355 */
    54 
    5556enum {
    5657        /** This message is sent to answerbox when the phone is hung up
     
    217218
    218219/** Last system IPC method */
    219 #define IPC_M_LAST_SYSTEM  511
     220enum {
     221        IPC_M_LAST_SYSTEM = 511,
     222};
    220223
    221224#endif
Note: See TracChangeset for help on using the changeset viewer.