Implement sysctl_handle_opaque()

FIXME: The snapshots are not reliable.
This commit is contained in:
Sebastian Huber 2013-10-30 15:24:00 +01:00
parent 24042643b3
commit c99816e1d7
2 changed files with 7 additions and 4 deletions

View File

@ -1108,22 +1108,23 @@ sysctl_handle_opaque(SYSCTL_HANDLER_ARGS)
req2 = *req;
retry:
generation = curthread->td_generation;
#else /* __rtems__ */
int error;
#endif /* __rtems__ */
error = SYSCTL_OUT(req, arg1, arg2);
if (error)
return (error);
#ifndef __rtems__
tries++;
if (generation != curthread->td_generation && tries < 3) {
*req = req2;
goto retry;
}
#endif /* __rtems__ */
error = SYSCTL_IN(req, arg1, arg2);
return (error);
#else /* __rtems__ */
/* FIXME */
return (0);
#endif /* __rtems__ */
}
/*

View File

@ -103,6 +103,8 @@ the current Git submodule commit is this
* TIMEOUT(9): Maybe use special task instead of timer server to call
callout_tick().
* sysctl_handle_opaque(): Implement reliable snapshots.
[listing]
----
/* sysinit section? */