commit | 55c4d8b8c0353b0b55afc78a944e2291ee9f8e7f | [log] [tgz] |
---|---|---|
author | Andrew Scull <ascull@google.com> | Tue Dec 18 18:50:18 2018 +0000 |
committer | Andrew Scull <ascull@google.com> | Wed Dec 19 11:41:11 2018 +0000 |
tree | 202048711ad5e2da1252ac58ff2ae3337315a173 | |
parent | 0330611fcc9fc6a4eafbf7566d770977f4cb7142 [diff] [blame] |
Add APIs to yield and get the ID of the VM. Change-Id: I2e6340d200cfddc7ca9877e91d785c438620b6c6
diff --git a/src/api.c b/src/api.c index 6be8702..7e6e4e6 100644 --- a/src/api.c +++ b/src/api.c
@@ -101,6 +101,14 @@ } /** + * Returns the ID of the VM. + */ +int64_t api_vm_get_id(const struct vcpu *current) +{ + return current->vm->id; +} + +/** * Returns the number of VMs configured to run. */ int64_t api_vm_get_count(void)