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

📄 attributes.c

📁 用c++包装好的线程库,直接拿来使用,提高效率.
💻 C
字号:
#include "thread.h"namespace cpp_threads {  //  // attributes - constructor  //  // initialize the attribute structure with default values.  attributes::attributes()  {    Pthread *p = Pthread::self();        if( !p ||  p->inherit() == attr_explicit_e ) {      a_scope       = process_private_e;      a_inherit     = attr_explicit_e;      a_policy      = rrobin_e;      a_state       = attr_joinable_e;    } else {      a_scope       = p->scope();      a_inherit     = p->inherit();      a_policy      = p->policy();      a_state       = p->joinable()?attr_joinable_e:attr_detached_e;    }    a_param.sched_priority = 0;  }}; // namespace

⌨️ 快捷键说明

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