req.oldfunc = sysctl_old_kernel;
req.newfunc = sysctl_new_kernel;
+#if 0
req.lock = 1;
+#endif
sysctl_lock(LK_SHARED);
error = sysctl_root(0, name, namelen, &req);
+#if 0
if (req.lock == 2)
vsunlock(req.oldptr, req.oldlen);
+#endif
sysctl_unlock();
int error = 0;
size_t i = 0;
+#if 0
if (req->lock == 1 && req->oldptr) {
vslock(req->oldptr, req->oldlen);
req->lock = 2;
}
+#endif
if (req->oldptr) {
i = l;
if (i > req->oldlen - req->oldidx)
while (oid && indx < CTL_MAXNAME) {
if (oid->oid_number == name[indx]) {
indx++;
- if (oid->oid_kind & CTLFLAG_NOLOCK)
- req->lock = 0;
if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) {
if (oid->oid_handler != NULL ||
indx == namelen) {
req.oldfunc = sysctl_old_user;
req.newfunc = sysctl_new_user;
+#if 0
req.lock = 1;
+#endif
req.td = curthread;
sysctl_lock(LK_SHARED);
} while (error == EAGAIN);
req = req2;
+#if 0
if (req.lock == 2)
vsunlock(req.oldptr, req.oldlen);
+#endif
sysctl_unlock();
#define CTLFLAG_RD 0x80000000 /* Allow reads of variable */
#define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */
#define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR)
-#define CTLFLAG_NOLOCK 0x20000000 /* XXX Don't Lock */
#define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */
#define CTLFLAG_SECURE 0x08000000 /* Permit set only if securelevel<=0 */
#define CTLFLAG_PRISON 0x04000000 /* Prisoned roots can fiddle */
*/
struct sysctl_req {
struct thread *td;
- int lock;
+ int unused01; /* was lock */
void *oldptr;
size_t oldlen;
size_t oldidx;