changed semaphore primitive functions to return MOO_PF_FAILURE upon an error

This commit is contained in:
hyunghwan.chung
2017-12-10 15:40:29 +00:00
parent 6a8db215f8
commit 69b2107ed9
4 changed files with 130 additions and 159 deletions

View File

@ -1018,10 +1018,6 @@ struct moo_pfinfo_t
* arguments.
*/
#define MOO_PF_CHECK_ARGS(moo,nargs,cond) do { \
if (!(cond)) { MOO_STACK_SETRETTOERROR ((moo), (nargs), MOO_EINVAL); return MOO_PF_SUCCESS; } \
} while(0)
#define MOO_PF_CHECK_ARGS_STRICT(moo,nargs,cond) do { \
if (!(cond)) { moo_seterrnum (moo, MOO_EINVAL); return MOO_PF_FAILURE; } \
} while(0)