diff options
| author | Boris Popov <bp@FreeBSD.org> | 2000-01-15 08:35:48 +0000 |
|---|---|---|
| committer | Boris Popov <bp@FreeBSD.org> | 2000-01-15 08:35:48 +0000 |
| commit | 1e77d7a17dd7ec433fa72c9f1c76d8d0b3135951 (patch) | |
| tree | 6824657661f887cfc37468f8098714c209187239 /sys | |
| parent | 6cca21b14d5dedea78dba7936f603c86d603128a (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/fs/nwfs/nwfs_vfsops.c | 9 | ||||
| -rw-r--r-- | sys/nwfs/nwfs_vfsops.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c index 5e7c5979597f..ac89567ad6fd 100644 --- a/sys/fs/nwfs/nwfs_vfsops.c +++ b/sys/fs/nwfs/nwfs_vfsops.c @@ -411,7 +411,16 @@ nwfs_quotactl(mp, cmd, uid, arg, p) int nwfs_init(struct vfsconf *vfsp) { +#ifndef SMP + int name[2]; + int olen, ncpu, plen, error; + name[0] = CTL_HW; + name[1] = HW_NCPU; + error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen); + if (error == 0 && ncpu > 1) + printf("warning: nwfs module compiled without SMP support."); +#endif nwfs_hash_init(); nwfs_pbuf_freecnt = nswbuf / 2 + 1; NCPVODEBUG("always happy to load!\n"); diff --git a/sys/nwfs/nwfs_vfsops.c b/sys/nwfs/nwfs_vfsops.c index 5e7c5979597f..ac89567ad6fd 100644 --- a/sys/nwfs/nwfs_vfsops.c +++ b/sys/nwfs/nwfs_vfsops.c @@ -411,7 +411,16 @@ nwfs_quotactl(mp, cmd, uid, arg, p) int nwfs_init(struct vfsconf *vfsp) { +#ifndef SMP + int name[2]; + int olen, ncpu, plen, error; + name[0] = CTL_HW; + name[1] = HW_NCPU; + error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen); + if (error == 0 && ncpu > 1) + printf("warning: nwfs module compiled without SMP support."); +#endif nwfs_hash_init(); nwfs_pbuf_freecnt = nswbuf / 2 + 1; NCPVODEBUG("always happy to load!\n"); |
