The NetBSD Project

CVS log for src/common/lib/libc/sys/cpuset.c

[BACK] Up to [cvs.NetBSD.org] / src / common / lib / libc / sys

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Sat May 11 11:53:55 2019 UTC (3 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base, ad-namecache, HEAD
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Fix bug, the computation of cpuset_nentries was incorrect, we must do +1
to be able to address the last 32 bits.

On a machine with 80 CPUs, this caused "cpuctl identify >64" to return
garbage.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jul 26 00:13:19 2018 UTC (3 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

Avoid undefined behavior in an cpuset.c

Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this.

cpuset.c:112:18, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jan 4 20:57:28 2018 UTC (4 years, 4 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.18: +6 -2 lines
Diff to previous 1.18 (colored)

Add bunch of missing includes of namespace.h in libc

The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global changes of the following symbols:
 - strlcat -> _strlcat
 - sysconf -> __sysconf
 - closedir -> _closedir
 - fparseln -> _fparseln
 - kill -> _kill
 - mkstemp -> _mkstemp
 - reallocarr -> _reallocarr
 - strcasecmp -> _strcasecmp
 - strncasecmp -> _strncasecmp
 - strptime -> _strptime
 - strtok_r -> _strtok_r
 - sysctl -> _sysctl
 - dlopen -> __dlopen
 - dlclose -> __dlclose
 - dlsym -> __dlsym

Sponsored by <The NetBSD Foundation>

Revision 1.18 / (download) - annotate - [select for diffs], Fri Mar 9 15:41:16 2012 UTC (10 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-base, tls-maxphys-20171202, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, khorben-n900, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: netbsd-8
Changes since 1.17: +7 -6 lines
Diff to previous 1.17 (colored)

Casts and type changes to fix portability issues.
- int -> size_t
- adjust width of RHS of shift
- adjust widths of types

Revision 1.17 / (download) - annotate - [select for diffs], Sun Aug 7 13:33:02 2011 UTC (10 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.16: +3 -161 lines
Diff to previous 1.16 (colored)

Add kcpuset(9) - a reworked dynamic CPU set implementation for kernel.
Suitable for use during the early boot.  MD and other implementations
should be replaced with this interface.

Discussed on: tech-kern@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Sep 21 02:03:29 2010 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

_cpuset_create: initialize size argument for sysctl call.
From PR/43837 by Sandy Snaman.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 25 19:38:25 2009 UTC (13 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, yamt-nfs-mp-base10, rmind-uvmplock-base, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.14: +14 -3 lines
Diff to previous 1.14 (colored)

- Add kcpuset_iszero().
- Fix kcpuset_match().

Revision 1.14 / (download) - annotate - [select for diffs], Sun Mar 15 20:08:43 2009 UTC (13 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.13: +47 -5 lines
Diff to previous 1.13 (colored)

- Add kcpuset_fill(), kcpuset_set() and kcpuset_match().
- KNF while here.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Feb 14 19:23:18 2009 UTC (13 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.12: +13 -13 lines
Diff to previous 1.12 (colored)

make this work with pcc. The previous construct is not valid c99.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 27 05:47:56 2008 UTC (13 years, 9 months ago) by dholland
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: netbsd-5, jym-xensuspend
Changes since 1.11: +9 -9 lines
Diff to previous 1.11 (colored)

Don't convert cpuid_t through int while testing it for being in range.
(Might truncate it, for one thing. Also, if the shift result is < 0 the
demons have already flown out of our nose.)

Fixes some -Wsign-compare warnings.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 14 01:07:39 2008 UTC (13 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.10: +5 -3 lines
Diff to previous 1.10 (colored)

Add few KASSERTs.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jun 22 21:49:31 2008 UTC (13 years, 10 months ago) by he
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)

Be consistent in how cpuset_nentries is computed in the kernel and
in user-land.  This fixes the user-land part.  Now "cpuctl identify 0"
gives a result instead of getting EINVAL from the set-affinity syscall.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jun 22 03:24:31 2008 UTC (13 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.8: +2 -4 lines
Diff to previous 1.8 (colored)

kcpuset_isset: remove if-check.  It is not reasonable for kernel,
saves few cycles, and it is better for CPU cache.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 22 00:05:09 2008 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.7: +125 -60 lines
Diff to previous 1.7 (colored)

Separate cpuset and kcpuset, and only use the bits in userland. Requested
by yamt

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jun 16 13:02:08 2008 UTC (13 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base4
Branch point for: yamt-pf42
Changes since 1.6: +4 -2 lines
Diff to previous 1.6 (colored)

We don't need any of this in standalone mode.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jun 16 02:53:32 2008 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

little more lint

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 16 02:30:03 2008 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored)

make lint happy

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 16 01:41:21 2008 UTC (13 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.3: +9 -9 lines
Diff to previous 1.3 (colored)

- Add general cpuset macros.
- Use kcpuset name for kernel-only functions.
- Use cpuid_t to specify CPU ID.
- Unify all cpuset users.

API is expected to be stable now.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 15 23:45:51 2008 UTC (13 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.2: +7 -5 lines
Diff to previous 1.2 (colored)

cpuset_create: check the return value of calloc().

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 15 23:41:39 2008 UTC (13 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.1: +13 -6 lines
Diff to previous 1.1 (colored)

- cpuset_create: pass correct argument to sysctl(3).
- Constify few variables.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jun 15 20:33:50 2008 UTC (13 years, 11 months ago) by christos
Branch: MAIN

cpuset related functions, shared between the kernel and userland.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>