Rev 1005 | Rev 1027 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1005 | Rev 1024 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | * |
122 | * |
123 | * @return 0 - Limit OK, -1 - limit exceeded |
123 | * @return 0 - Limit OK, -1 - limit exceeded |
124 | */ |
124 | */ |
125 | static int check_call_limit(void) |
125 | static int check_call_limit(void) |
126 | { |
126 | { |
127 | if (atomic_inc_post(&TASK->active_calls) > IPC_MAX_ASYNC_CALLS) { |
127 | if (atomic_preinc(&TASK->active_calls) > IPC_MAX_ASYNC_CALLS) { |
128 | atomic_dec(&TASK->active_calls); |
128 | atomic_dec(&TASK->active_calls); |
129 | return -1; |
129 | return -1; |
130 | } |
130 | } |
131 | return 0; |
131 | return 0; |
132 | } |
132 | } |