mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-24 00:59:56 +08:00
Implement sysctl_handle_opaque()
FIXME: The snapshots are not reliable.
This commit is contained in:
parent
24042643b3
commit
c99816e1d7
@ -1108,22 +1108,23 @@ sysctl_handle_opaque(SYSCTL_HANDLER_ARGS)
|
|||||||
req2 = *req;
|
req2 = *req;
|
||||||
retry:
|
retry:
|
||||||
generation = curthread->td_generation;
|
generation = curthread->td_generation;
|
||||||
|
#else /* __rtems__ */
|
||||||
|
int error;
|
||||||
|
#endif /* __rtems__ */
|
||||||
error = SYSCTL_OUT(req, arg1, arg2);
|
error = SYSCTL_OUT(req, arg1, arg2);
|
||||||
if (error)
|
if (error)
|
||||||
return (error);
|
return (error);
|
||||||
|
#ifndef __rtems__
|
||||||
tries++;
|
tries++;
|
||||||
if (generation != curthread->td_generation && tries < 3) {
|
if (generation != curthread->td_generation && tries < 3) {
|
||||||
*req = req2;
|
*req = req2;
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
error = SYSCTL_IN(req, arg1, arg2);
|
error = SYSCTL_IN(req, arg1, arg2);
|
||||||
|
|
||||||
return (error);
|
return (error);
|
||||||
#else /* __rtems__ */
|
|
||||||
/* FIXME */
|
|
||||||
return (0);
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -103,6 +103,8 @@ the current Git submodule commit is this
|
|||||||
* TIMEOUT(9): Maybe use special task instead of timer server to call
|
* TIMEOUT(9): Maybe use special task instead of timer server to call
|
||||||
callout_tick().
|
callout_tick().
|
||||||
|
|
||||||
|
* sysctl_handle_opaque(): Implement reliable snapshots.
|
||||||
|
|
||||||
[listing]
|
[listing]
|
||||||
----
|
----
|
||||||
/* sysinit section? */
|
/* sysinit section? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user