diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-30 15:24:00 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-31 13:18:54 +0100 |
commit | c99816e1d79d4bff2c90c314d7e2dd3fc21a1134 (patch) | |
tree | b53777e99e7aadf082c0944d0d832b3935002ca2 | |
parent | Revert superfluous changes (diff) | |
download | rtems-libbsd-c99816e1d79d4bff2c90c314d7e2dd3fc21a1134.tar.bz2 |
Implement sysctl_handle_opaque()
FIXME: The snapshots are not reliable.
-rw-r--r-- | freebsd/sys/kern/kern_sysctl.c | 9 | ||||
-rw-r--r-- | libbsd.txt | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/freebsd/sys/kern/kern_sysctl.c b/freebsd/sys/kern/kern_sysctl.c index a1270a5c..23cd6a70 100644 --- a/freebsd/sys/kern/kern_sysctl.c +++ b/freebsd/sys/kern/kern_sysctl.c @@ -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__ */ } /* @@ -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? */ |