Skip to content

Commit d1a17a6

Browse files
ssqrejren1
authored andcommitted
dm: rename fbsdrun_addcpu and fbsdrun_deletecpu
Remove weird prefix "fbsdrun" from the function name. Since "fbsdrun_addcpu" has never been called by external functions, Let's remove its declaration from "dm.h" and make it as a static function to keep consistency with "fbsdrun_deletecpu". Signed-off-by: Jie Deng <jie.deng@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent c0d4b90 commit d1a17a6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

devicemodel/core/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ fbsdrun_start_thread(void *param)
267267
return NULL;
268268
}
269269

270-
void
271-
fbsdrun_addcpu(struct vmctx *ctx, int guest_ncpus)
270+
static void
271+
add_cpu(struct vmctx *ctx, int guest_ncpus)
272272
{
273273
int i;
274274
int error;
@@ -290,7 +290,7 @@ fbsdrun_addcpu(struct vmctx *ctx, int guest_ncpus)
290290
}
291291

292292
static int
293-
fbsdrun_deletecpu(struct vmctx *ctx, int vcpu)
293+
delete_cpu(struct vmctx *ctx, int vcpu)
294294
{
295295
if (!CPU_ISSET(vcpu, &cpumask)) {
296296
fprintf(stderr, "Attempting to delete unknown cpu %d\n", vcpu);
@@ -845,7 +845,7 @@ main(int argc, char *argv[])
845845
/*
846846
* Add CPU 0
847847
*/
848-
fbsdrun_addcpu(ctx, guest_ncpus);
848+
add_cpu(ctx, guest_ncpus);
849849

850850
/* Make a copy for ctx */
851851
_ctx = ctx;
@@ -856,7 +856,7 @@ main(int argc, char *argv[])
856856
mevent_dispatch();
857857

858858
vm_pause(ctx);
859-
fbsdrun_deletecpu(ctx, BSP);
859+
delete_cpu(ctx, BSP);
860860

861861
if (vm_get_suspend_mode() != VM_SUSPEND_RESET)
862862
break;

devicemodel/include/dm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ int vmexit_task_switch(struct vmctx *ctx, struct vhm_request *vhm_req,
4848
void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len);
4949
void *dm_gpa2hva(uint64_t gpa, size_t size);
5050

51-
void fbsdrun_addcpu(struct vmctx *ctx, int guest_ncpus);
5251
int fbsdrun_muxed(void);
5352
int fbsdrun_vmexit_on_hlt(void);
5453
int fbsdrun_vmexit_on_pause(void);

0 commit comments

Comments
 (0)