-1
gccでthread_createを使って簡単なCコードを構築しようとしています。 thread_create()を使用するには、どのライブラリを "#include"する必要がありますか? gccに特定のフラグも送信する必要がありますか?thread_create():メンバーCライブラリ
gccでthread_createを使って簡単なCコードを構築しようとしています。 thread_create()を使用するには、どのライブラリを "#include"する必要がありますか? gccに特定のフラグも送信する必要がありますか?thread_create():メンバーCライブラリ
あなたがLinux上でなら、あなたのターミナルでman pthread_create
を入力することができ、pthread_create
のマンページを参照してください、詳細については、<pthread.h>
に含まpthread_create
を使用することができます。
「」または[POSIX pthread_create](http://pubs.opengroup.org/)で定義されている[C11 thrd_create](http://en.cppreference.com/w/c/thread/thrd_create)を意味しますか? onlinepubs/007908775/xsh/pthread_create.html)は ''で定義されていますか? –
@AlterMann私は、http://stackoverflow.com/questions/15300830/how-many-processes-and-threads-will-be-createdおよびSilberschatzらによるオペレーティングシステムの概念の書籍に記載されている機能を参照しています。 – islamfaisal
特定のフラグもgccに送信する必要がありますか?はい。コンパイルには-lpthreadを使用する必要があります –