continue_hypercall_on_cpu() always defers execution of the continuation

...even when scheduled to run on the current physical cpu. This
ensures that locks get dropped correctly before executing the
continuation code, and also allows the original caller to determine
whether the continuation has/will execute based on c_h_o_c()'s
immediate return code.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2010-04-15 11:31:58 +01:00
1 parent e6baf56c8c
commit dcc9060e4a
2 files changed
+6 -4

No files matched your search

-3
View File
@@ -951,9 +951,6 @@ int continue_hypercall_on_cpu(
if ( (cpu >= NR_CPUS) || !cpu_online(cpu) )
return -EINVAL;
if ( cpu == smp_processor_id() )
return func(data);
info = this_cpu(continue_info);
if ( info == NULL )
{
+6 -1
View File
@@ -63,7 +63,12 @@ void arch_vcpu_reset(struct vcpu *v);
bool_t domctl_lock_acquire(void);
void domctl_lock_release(void);
/* Continue the current hypercall via func(data) on specified cpu. */
/*
* Continue the current hypercall via func(data) on specified cpu.
* If this function returns 0 then the function is guaranteed to run at some
* point in the future. If this function returns an error code then the
* function has not been and will not be executed.
*/
int continue_hypercall_on_cpu(
unsigned int cpu, long (*func)(void *data), void *data);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.