I would like to use #define for locking/unlocking mutex. But on other platform where I only use single thread, I would like to disable locking and unlocking and do nothing.
In this case, how can I safely define it on apps that I don't use the feature?
For example,
#define SYS_LOCK sys_lock();
#define SYS_UNLOCK sys_unlock();
This is what I use in platforms that support multithreads.
But I want to disable it in on other platforms.
Is it safe to define like this so calling SYS_LOCK and SYS_UNLOCK does nothing?
#define SYS_LOCK
#define SYS_UNLOCK