mirror of
https://github.com/schoebel/mars
synced 2024-12-25 08:02:26 +00:00
brick: safeguard mb() before check
This commit is contained in:
parent
8761f8739d
commit
320e9335c9
@ -328,20 +328,22 @@ struct generic_output {
|
||||
};
|
||||
|
||||
#define GENERIC_OUTPUT_CALL(OUTPUT,OP,ARGS...) \
|
||||
( \
|
||||
({ \
|
||||
mb(); \
|
||||
(void)LOCK_CHECK(OP), \
|
||||
(OUTPUT) && (OUTPUT)->ops->OP ? \
|
||||
(OUTPUT)->ops->OP(OUTPUT, ##ARGS) : \
|
||||
-ENOTCONN \
|
||||
)
|
||||
-ENOTCONN; \
|
||||
})
|
||||
|
||||
#define GENERIC_INPUT_CALL(INPUT,OP,ARGS...) \
|
||||
( \
|
||||
({ \
|
||||
mb(); \
|
||||
(void)LOCK_CHECK(OP), \
|
||||
(INPUT) && (INPUT)->connect ? \
|
||||
GENERIC_OUTPUT_CALL((INPUT)->connect, OP, ##ARGS) : \
|
||||
-ENOTCONN \
|
||||
)
|
||||
-ENOTCONN; \
|
||||
})
|
||||
|
||||
#define GENERIC_BRICK_OPS(BRITYPE) \
|
||||
int (*brick_switch)(struct BRITYPE##_brick *brick); \
|
||||
|
Loading…
Reference in New Issue
Block a user