“无手动输入pthread”-找不到按名称的手册页


18

我是Ubuntu的新手,想为Operating System中的读写器块编写代码,但是当我触发该命令时,man pthread它给了我一个错误,没有手动输入pthread。如何解决该问题?

Answers:


26

首先安装以下手册:

sudo apt-get install manpages-posix manpages-posix-dev

接着:

man pthreads

现在应该可以了。


谢谢。我想这是您刚刚了解的事情之一?
Neonfirelights 2014年

1

好的,因此您要查找的手册页不存在:

$ man pthread
No manual entry for pthread

嗯...让我们寻找类似的东西!
我们将自身man的选项-k为:

$ man -k pthread 
pthread_attr_destroy (3) - initialize and destroy thread attributes object
pthread_attr_getaffinity_np (3) - set/get CPU affinity attribute in thread attributes object
pthread_attr_getdetachstate (3) - set/get detach state attribute in thread attributes object
pthread_attr_getguardsize (3) - set/get guard size attribute in thread attributes object
[... 47 more lines ...]
pthread_timedjoin_np (3) - try to join with a terminated thread
pthread_tryjoin_np (3) - try to join with a terminated thread
pthread_yield (3)    - yield the processor
pthreads (7)         - POSIX threads
vfs_aio_pthread (8)  - implement async I/O in Samba vfs using a pthread pool

好吧...一些相关的东西...哦!pthreads看起来很有趣!

$ man pthreads|head -n 12
PTHREADS(7)           Linux Programmer's Manual          PTHREADS(7)



NAME
       pthreads - POSIX threads

DESCRIPTION
       POSIX.1  specifies  a  set  of  interfaces (functions, header
       files) for  threaded  programming  commonly  known  as  POSIX
       threads,  or Pthreads.  A single process can contain multiple
       threads, all of which are executing the same program.   These

现在,看来我们找到了!

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.