Re: #ifdef statement inside #define

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/18/06, Katharina Denkinger <kdenki@xxxxxx> wrote:
Has anyone an idea how to code following macro:
#define INIT()    \

    #ifdef THREDSAFE        \

              lock_mutex()   \

    #endif    \

Hi Katharina.

I have no Idea, but if the code is the one you're showing,
this will do:

#ifndef THREDSAFE
 #define INIT()
#else
  #define INIT() lock_mutex()
#endif

Regards,
Nelson.-

--
http://arhuaco.org/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux