FreeBSD Bugzilla – Attachment 210600 Details for
Bug 242679
emulators/open-vm-tools-nox11: fails to build after r355732
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Replace deprecated timeout(9) interface with callout(9) (v2)
patch-modules_freebsd_vmmemctl_os.c (text/plain), 1.63 KB, created by
Ruslan Garipov
on 2020-01-10 20:08:24 UTC
(
hide
)
Description:
Replace deprecated timeout(9) interface with callout(9) (v2)
Filename:
MIME Type:
Creator:
Ruslan Garipov
Created:
2020-01-10 20:08:24 UTC
Size:
1.63 KB
patch
obsolete
>--- modules/freebsd/vmmemctl/os.c.orig 2020-01-10 03:33:43 UTC >+++ modules/freebsd/vmmemctl/os.c >@@ -64,7 +64,11 @@ > > typedef struct { > /* system structures */ >+#if __FreeBSD_version >= 1300067 >+ struct callout callout_handle; >+#else > struct callout_handle callout_handle; >+#endif > > /* termination flag */ > volatile int stop; >@@ -678,7 +682,12 @@ vmmemctl_poll(void *data) // IN > if (!t->stop) { > /* invoke registered handler, rearm timer */ > Balloon_QueryAndExecute(); >+#if __FreeBSD_version >= 1300067 >+ callout_reset(&t->callout_handle, BALLOON_POLL_PERIOD * hz, vmmemctl_poll, >+ t); >+#else > t->callout_handle = timeout(vmmemctl_poll, t, BALLOON_POLL_PERIOD * hz); >+#endif > } > } > >@@ -712,15 +721,23 @@ vmmemctl_init(void) > } > > /* initialize timer state */ >+#if __FreeBSD_version >= 1300067 >+ callout_init(&state->timer.callout_handle, 0); >+#else > callout_handle_init(&state->timer.callout_handle); >+#endif > > os_pmap_init(pmap); > os_balloonobject_create(); > > /* Set up and start polling */ >- callout_handle_init(&t->callout_handle); > t->stop = FALSE; >+#if __FreeBSD_version >= 1300067 >+ callout_reset(&t->callout_handle, BALLOON_POLL_PERIOD * hz, vmmemctl_poll, >+ t); >+#else > t->callout_handle = timeout(vmmemctl_poll, t, BALLOON_POLL_PERIOD * hz); >+#endif > > vmmemctl_init_sysctl(); > >@@ -759,7 +776,11 @@ vmmemctl_cleanup(void) > > /* Stop polling */ > t->stop = TRUE; >+#if __FreeBSD_version >= 1300067 >+ callout_drain(&t->callout_handle); >+#else > untimeout(vmmemctl_poll, t, t->callout_handle); >+#endif > > os_balloonobject_delete(); > os_pmap_free(pmap);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242679
:
210077
|
210588
| 210600