diff options
author | bp <bp@FreeBSD.org> | 2000-01-15 08:35:48 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2000-01-15 08:35:48 +0000 |
commit | b7c9ebac804e0eee65364d2475e6267880ce06a9 (patch) | |
tree | f708b95342ea1babcf39d68aa9ce760808c76997 /sys/fs | |
parent | 50108d27969d163657aee76acd658854fae6d543 (diff) | |
download | FreeBSD-src-b7c9ebac804e0eee65364d2475e6267880ce06a9.zip FreeBSD-src-b7c9ebac804e0eee65364d2475e6267880ce06a9.tar.gz |
Check if module was compiled without SMP support and running on
an SMP system.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nwfs/nwfs_vfsops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c index 5e7c597..ac89567 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"); |