qemu-e2k/monitor
Emanuele Giuseppe Esposito 880eeec613 jobs: group together API calls under the same job lock
Now that the API offers also _locked() functions, take advantage
of it and give also the caller control to take the lock and call
_locked functions.

This makes sense especially when we have for loops, because it
makes no sense to have:

for(job = job_next(); ...)

where each job_next() takes the lock internally.
Instead we want

JOB_LOCK_GUARD();
for(job = job_next_locked(); ...)

In addition, protect also direct field accesses, by either creating a
new critical section or widening the existing ones.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-12-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-10-07 12:11:41 +02:00
..
hmp-cmds.c monitor: expose monitor_puts to rest of code 2022-10-06 11:53:40 +01:00
hmp.c monitor: expose monitor_puts to rest of code 2022-10-06 11:53:40 +01:00
meson.build meson: add spice_headers dependency. 2020-10-15 11:14:40 +02:00
misc.c monitor: Support specified vCPU registers 2022-09-15 11:58:37 +01:00
monitor-internal.h monitor: expose monitor_puts to rest of code 2022-10-06 11:53:40 +01:00
monitor.c Move error_printf_unless_qmp() with monitor unit 2022-04-21 17:09:09 +04:00
qmp-cmds-control.c qapi: Implement deprecated-output=hide for QMP introspection 2021-03-19 16:05:11 +01:00
qmp-cmds.c jobs: group together API calls under the same job lock 2022-10-07 12:11:41 +02:00
qmp.c monitor/qmp: fix race on CHR_EVENT_CLOSED without OOB 2021-05-12 17:29:11 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00