{"id":819,"date":"2010-07-20T06:22:23","date_gmt":"2010-07-20T12:22:23","guid":{"rendered":"http:\/\/edsionte.com\/techblog\/?p=819"},"modified":"2010-08-15T03:12:29","modified_gmt":"2010-08-15T09:12:29","slug":"%e7%ba%bf%e7%a8%8bid%e7%9a%84%e8%be%93%e5%87%ba%e6%a0%bc%e5%bc%8f","status":"publish","type":"post","link":"http:\/\/edsionte.com\/techblog\/archives\/819","title":{"rendered":"\u7ebf\u7a0bID\u7684\u8f93\u51fa\u683c\u5f0f"},"content":{"rendered":"<p>Last Update:8\/15<\/p>\n<p>\u5728\u83b7\u53d6\u7ebf\u7a0bID\u7684\u65f6\u5019\uff0c\u5e38\u7528\u5230pthread_self()\u51fd\u6570\u83b7\u53d6\u5f53\u524d\u7ebf\u7a0b\u7684ID\uff0c\u5b83\u8fd4\u56de\u7684ID\u662fpthread_t\u7c7b\u578b\u7684\u3002\u5982\u679c\u8981\u6253\u5370\u51fa\u7ebf\u7a0bID\uff0c\u7528\u4ec0\u4e48\u8f93\u51fa\u683c\u5f0f\u5462\uff1f<\/p>\n<p>\u5728<a href=\"http:\/\/book.douban.com\/subject\/3031572\/\" target=\"_blank\">\u6b64\u4e66<\/a>\u4e2d\u4f8b\u98988_1\u4e2d\u4f7f\u7528\u7684\u662f%u\uff0c\u5373unsigned int,\u4f46\u662f\u7f16\u8bd1\u65f6\u5019\u6709\u4e00\u4e2awarning:<\/p>\n<p>format \u2018%u\u2019 expects type \u2018unsigned int\u2019, but argument 2 has type \u2018pthread_t\u2019\u3002<\/p>\n<p>\u5176\u5b9e\u7ebf\u7a0bID\u7684\u683c\u5f0f\u5e94\u8be5\u662funsigned long\uff0c\u6240\u4ee5\u8f93\u51fa\u683c\u5f0f\u4e3a:%lu\u3002\u518d\u6b21\u7f16\u8bd1\u5c31\u5bf9\u4e86\u3002linux\u4e2d\u8fd8\u6709\u4e00\u4e9bID\u7c7b\u7684\u6570\u636e\u7c7b\u578b\uff0c\u6bd4\u5982\u5e38\u89c1\u7684pid\uff0c\u5b83\u7684\u8f93\u51fa\u683c\u5f0f\u4e3a%d\uff1b<\/p>\n<p>\u518d\u6bd4\u5982\u6587\u4ef6\u72b6\u6001\u7ed3\u6784\u4f53struct stat *buf\u4e2d\u7684st_ino\u5b57\u6bb5\uff0c\u5b83\u7684\u7c7b\u578b\u4e3aino_t\uff0c\u800c\u8f93\u51fa\u683c\u5f0f\u4e3a%lu\u3002\u5728\u5185\u6838\u7684inode\u7ed3\u6784\u4f53\uff08include\/linux\/fs.h\uff09\u4e2d\u53ef\u4ee5\u627e\u5230\u8fd9\u4e2a\u5b57\u6bb5\u7684\u6700\u7ec8\u9762\u76ee\uff1aunsigned long i_ino;\u5b83\u4fbf\u662f\u7d22\u5f15\u7ed3\u70b9\u53f7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last Update:8\/15 \u5728\u83b7\u53d6\u7ebf\u7a0bID\u7684\u65f6\u5019\uff0c\u5e38\u7528\u5230pthread_self()\u51fd\u6570\u83b7\u53d6\u5f53\u524d\u7ebf\u7a0b\u7684I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74,1],"tags":[118,117,115],"class_list":["post-819","post","type-post","status-publish","format-standard","hentry","category-c","category-linuxc","tag-118","tag-117","tag-115"],"views":5650,"_links":{"self":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/posts\/819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/comments?post=819"}],"version-history":[{"count":0,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/posts\/819\/revisions"}],"wp:attachment":[{"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/media?parent=819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/categories?post=819"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/edsionte.com\/techblog\/wp-json\/wp\/v2\/tags?post=819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}