⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pthread_attr_getcpu_np.3

📁 rtlinux-3.1源代码
💻 3
字号:
.\" This -*- nroff -*- file has been generated from.\" DocBook SGML with docbook-to-man on Debian GNU/Linux....\"...\"	transcript compatibility for postscript use....\"...\"	synopsis:  .P! <file.ps>...\".de P!\\&..fl			\" force out current output buffer\\!%PB\\!/showpage{}def...\" the following is from Ken Flowers -- it prevents dictionary overflows\\!/tempdict 200 dict def tempdict begin.fl			\" prolog.sy cat \\$1\" bring in postscript file...\" the following line matches the tempdict above\\!end % tempdict %\\!PE\\!..sp \\$2u	\" move below the image...de pF.ie     \\*(f1 .ds f1 \\n(.f.el .ie \\*(f2 .ds f2 \\n(.f.el .ie \\*(f3 .ds f3 \\n(.f.el .ie \\*(f4 .ds f4 \\n(.f.el .tm ? font overflow.ft \\$1...de fP.ie     !\\*(f4 \{\.	ft \\*(f4.	ds f4\"'	br \}.el .ie !\\*(f3 \{\.	ft \\*(f3.	ds f3\"'	br \}.el .ie !\\*(f2 \{\.	ft \\*(f2.	ds f2\"'	br \}.el .ie !\\*(f1 \{\.	ft \\*(f1.	ds f1\"'	br \}.el .tm ? font underflow...ds f1\".ds f2\".ds f3\".ds f4\"'\" t .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n  .TH "pthread_attr_getcpu_np" "3" .SH "NAME" pthread_attr_setcpu_np, pthread_attr_getcpu_nppthread_attr_getcpu_np \(em examine and change the CPU pthread attribute .SH "SYNOPSIS" .PP .nf .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n #include <rtl_sched.h>  int \fBpthread_attr_setcpu_np\fP(pthread_attr_t \fB*attr\fR, int \fBcpu\fR); int \fBpthread_attr_getcpu_np\fP(pthread_attr_t \fB*attr\fR, int \fB*cpu\fR); .fi .SH "DESCRIPTION" .PP These functions are non-portable RTLinux extensions.  On SMP machines they allow a thread to be scheduled on a specific CPU. The RTLinux scheduler does not try to guess what thread belongs to what CPU. The default processor is the processor where a thread is created, but RTLinux really wants the application to tell it where to run threads. .PP \fBpthread_attr_setcpu_np\fP modifies the thread attribute object \fIattribute\fP so that the created thread would be scheduled on the CPU with id \fIcpu\fP (as displayed in \fI/proc/cpuinfo\fP).  The thread attribute object \fIattr\fP first has to be initialized with \fBpthread_attr_init(3)\fP. .PP \fBpthread_attr_getcpu_np\fP fills the location pointed to by \fBcpu\fR with the CPU id from the attribute structure. .SH "RETURN VALUE" .PP All functions return 0 on success and a non-zero error code on error. .SH "ERRORS" .PP \fBpthread_attr_setcpu_np\fP returns \fIEINVAL\fP if the specified CPU does not exist in the system. .SH "NOTES" .PP If \fBpthread_attr_setcpu_np\fP was not used on the attribute object passed to \fBpthread_create\fP, the thread is scheduled on the current CPU. .SH "AUTHOR" .PP Michael Barabanov (\fIbaraban@fsmlabs.com (link to URL mailto:baraban@fsmlabs.com) \fR) .SH "SEE ALSO" \fIUNIX spec pthread_attr_getstacksize(3) (link to URL ../susv2/xsh/pthread_attr_getstacksize.html) \fR, \fIUNIX spec pthread_attr_setstacksize(3) (link to URL ../susv2/xsh/pthread_attr_setstacksize.html) \fR, \fIUNIX spec pthread_attr_setschedparam(3) (link to URL ../susv2/xsh/pthread_attr_setschedparam.html) \fR, \fIUNIX spec pthread_attr_init(3) (link to URL ../susv2/xsh/pthread_attr_init.html) \fR, \fIUNIX spec pthread_attr_getschedparam(3) (link to URL ../susv2/xsh/pthread_attr_getschedparam.html) \fR, \fIUNIX spec pthread_create(3) (link to URL ../susv2/xsh/pthread_create.html) \fR .PP \(co2001 FSMLabs Inc. .PP All rights reserved. ...\" created by instant / docbook-to-man, Thu 26 Jul 2001, 11:19 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -