| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#include "preamble.h" |
| 18 |
|
| 19 |
static bool s_is_on_callers_thread(struct aws_event_loop *event_loop |
| 20 |
_(ghost \claim(c_event_loop)) |
| 21 |
) { |
| 22 |
_(assert \always_by_claim(c_event_loop, event_loop)) |
| 23 |
struct epoll_loop *epoll_loop = event_loop->impl_data; |
| 24 |
_(assert \always_by_claim(c_event_loop, epoll_loop)) |
| 25 |
_(assert \inv(epoll_loop)) |
| 26 |
|
| 27 |
aws_thread_id_t *thread_id = aws_atomic_load_ptr(&epoll_loop->running_thread_id); |
| 28 |
_(assume \thread_local(thread_id)) |
| 29 |
_(assume thread_id == NULL || *thread_id == \addr(event_loop->\owner)) |
| 30 |
|
| 31 |
return thread_id && aws_thread_thread_id_equal(*thread_id, aws_thread_current_thread_id()); |
| 32 |
} |
| 33 |
|