„Brak ręcznego wprowadzania pthread” - nie można znaleźć strony podręcznika według nazwy


18

Jestem nowy w Ubuntu, chciałem napisać kod dla bloku czytnik-pisarz w systemie operacyjnym, ale kiedy uruchomiłem polecenie, man pthreadnie dało mi to błędu ręcznego wpisu dla pthread . Co można zrobić, aby rozwiązać problem?

Odpowiedzi:


26

Najpierw zainstaluj te strony:

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

i wtedy:

man pthreads

Teraz powinno działać.


Dzięki. Myślę, że to jedna z tych rzeczy, które właśnie musiałaś wiedzieć?
Neonfirelights

1

Ok, więc strony man, której szukasz, nie ma:

$ man pthread
No manual entry for pthread

Hmm ... szukajmy czegoś podobnego!
Zobaczymy manopcję -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

Ok ... kilka powiązanych rzeczy ... Och! pthreadswygląda ciekawie!

$ 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

Teraz wygląda na to, że go znaleźliśmy!

Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.