{"type":"rich","published":"2008-06-10 00:56:57","author_name":"amachang","height":"190","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/amachang/","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Famachang.hatenablog.com%2Fentry%2F20080610%2F1213113417\" title=\" pthread \u52c9\u5f37 - IT\u6226\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","url":"https://amachang.hatenablog.com/entry/20080610/1213113417","title":" pthread \u52c9\u5f37","categories":["C++"],"image_url":null,"width":"100%","blog_url":"https://amachang.hatenablog.com/","description":"\u3060\u3089\u3060\u3089\u66f8\u304f\u3088 \u521d\u3081\u3066\u306e\u30b3\u30fc\u30c9 #include <pthread.h> void* f(void* p) { puts(\"hello\"); sleep(1); puts(\"hello\"); sleep(1); puts(\"hello\"); } int main(int argc, char** argv) { pthread_t thread; pthread_create(&thread, NULL, f, (void*)NULL); pthread_join(thread, NULL); } $ gcc p.c -lpthread && ./a.out hello hello hello\u2026","blog_title":"IT\u6226\u8a18"}