{"id":1097,"date":"2022-03-02T16:32:16","date_gmt":"2022-03-02T08:32:16","guid":{"rendered":"https:\/\/www.xianwaizhiyin.net\/?p=1097"},"modified":"2022-06-11T02:33:20","modified_gmt":"2022-06-10T18:33:20","slug":"x86%e6%b1%87%e7%bc%96%e5%85%a5%e9%97%a8-%e5%a4%9a%e7%ba%bf%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xianwaizhiyin.net\/?p=1097","title":{"rendered":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b"},"content":{"rendered":"\n<p>\u51e0\u4e4e\u6bcf\u4e2a\u505a\u5e94\u7528\u5f00\u53d1\u7684\u5de5\u7a0b\u5e08\uff0c\u5b66\u4e60\u6c47\u7f16\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u9047\u5230\u8fd9\u6837\u4e00\u4e2a\u56f0\u60d1\uff0c\u5404\u79cd\u6c47\u7f16\u4e66\u7c4d\uff0c\u4f8b\u5982\u300a\u6c47\u7f16\u8bed\u8a00 \u57fa\u4e8ex86\u300b\u300a\u73b0\u4ee3x86\u6c47\u7f16\u7a0b\u5e8f\u8bbe\u8ba1\u300b\u8fd9\u4e9b\u4e66\u7c4d\u90fd\u662f\u8bb2 \u6c47\u7f16\u6307\u4ee4 \u5728\u5355\u6838\u91cc\u9762\u7684\u60c5\u51b5\u3002\u6211\u4eec\u505a\u5e94\u7528\u5f00\u53d1\u7684\u65f6\u5019\u662f\u7ecf\u5e38\u7528\u5230\u591a\u7ebf\u7a0b\u7684\uff0c\u800c\u6211\u4eec\u7684C\/C++ \u4ee3\u7801\u6700\u540e\u662f\u7ffb\u8bd1\u6210\u6c47\u7f16\u7684\uff0c\u867d\u7136 <code class=\"prettyprint\" >pthread_create<\/code> \u51fd\u6570\u662f\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u7684\u51fd\u6570\uff0c\u4f46\u662f\u64cd\u4f5c\u7cfb\u7edf\u672c\u8d28\u4e0a\u4e5f\u662f\u4e00\u6761\u4e00\u6761\u6c47\u7f16\u6307\u4ee4\u5806\u53e0\u800c\u6210\u3002\u6240\u4ee5\u505a\u5e94\u7528\u5f00\u53d1\u7684\u5de5\u7a0b\u5e08 \u57fa\u672c\u90fd\u6709\u8fd9\u6837\u4e00\u4e2a\u597d\u5947\u5fc3\uff0c\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u7684\u591a\u7ebf\u7a0b\u7684\u6c47\u7f16\u5b9e\u73b0\u662f\u600e\u6837\u7684\uff0c\u4ed6\u662f\u600e\u4e48\u8c03\u5ea6\u4e0d\u540c\u7684\u7ebf\u7a0b\u7684\u6c47\u7f16\u6307\u4ee4\u5230\u4e0d\u540c\u7684CPU\u6838\u5fc3\u4e0a\u8fd0\u884c\u7684\uff1f<\/p>\n\n\n\n<p>\u9996\u5148\uff0cLinux \u521b\u5efa\u7ebf\u7a0b\u7684\u51fd\u6570\u662f <code class=\"prettyprint\" >pthread_create()<\/code>\uff0c\u5b9e\u9645\u4e0a\u8fd9\u662f <a href=\"https:\/\/www.gnu.org\/software\/libc\/\">glibc<\/a> \u5e93\u7684\u4e00\u4e2a\u51fd\u6570\uff0cglibc \u662f \u7c7bLinux \u64cd\u4f5c\u7cfb\u7edf\u7684\u6838\u5fc3\u5e93\uff0c\u662f\u7528C\u8bed\u8a00\u5199\u7684\uff0c\u8fd9\u4e2a\u5e93\u6839\u636e\u5404\u79cd\u6807\u51c6 ISO C11, POSIX.1-2008, BSD, OS-specific APIs\uff0c\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u7684\u51fd\u6570\u5b9e\u73b0\uff0c\u4f8b\u5982\u6211\u4eec\u7ecf\u5e38\u7528\u7684 <code>open<\/code>, <code>read<\/code>, <code>write<\/code>, <code>malloc<\/code>, <code>printf<\/code>, <code>getaddrinfo<\/code>, <code>pthread_create<\/code>, \u7b49\u7b49\u51fd\u6570\uff0c\u90fd\u662f\u8fd9\u4e2a\u5e93\u5b9e\u73b0\u7684\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u5c31\u6765\u770b\u4e0b <code class=\"prettyprint\" >pthread_create()<\/code> \u51fd\u6570\u7684\u5185\u90e8\u5b9e\u73b0\uff0c\u4f7f\u7528\u7684 glibc \u7248\u672c\u662f 2.27 \uff0cpthread_create \u51fd\u6570\u7684\u5b9e\u73b0\u5728 <code>glibc-2.27\/nptl\/pthread_create.c<\/code>\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"371\" src=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png\" alt=\"\" class=\"wp-image-1776\" srcset=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png 649w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3-300x171.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/figure>\n\n\n\n<p>\u5176\u5b9e\u5728\u8fd9\u91cc\uff0c\u6211\u7279\u522b\u63a8\u8350\u5927\u5bb6\u5148\u770b\u4e00\u904d state-thread \u7684\u534f\u7a0b\u5b9e\u73b0\uff0c\u56e0\u4e3a\u534f\u7a0b\u8ddf\u7ebf\u7a0b\u7684\u5b9e\u73b0\u975e\u5e38\u7c7b\u4f3c\u3002<a href=\"https:\/\/www.xianwaizhiyin.net\/?cat=24\">\u300astate-thread\u6e90\u7801\u5206\u6790\u300b<\/a>\uff0cST\u534f\u7a0b\u53ef\u4ee5\u5f88\u8f7b\u6613\u5730\u5728 linux \u73af\u5883\u4e0b\u8c03\u8bd5\uff0c\u6709\u52a9\u7406\u89e3\u7ebf\u7a0b\u7684\u5b9e\u73b0\uff0c\u7ebf\u7a0b\u53ea\u80fd\u8c03\u8bd5\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\uff0c\u6bd4\u8f83\u9ebb\u70e6\u3002<\/p>\n\n\n\n<p>pthread_create \u51fd\u6570\u7684\u4ee3\u7801\u5982\u4e0b\uff08\u90e8\u5206\u4ee3\u7801\u5df2\u7701\u7565\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >__pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr,\n              void *(*start_routine) (void *), void *arg)\n{\n  STACK_VARIABLES;\n\u200b\n  const struct pthread_attr *iattr = (struct pthread_attr *) attr;\n  struct pthread_attr default_attr;\n\u200b\n  struct pthread *pd = NULL;\n  int err = ALLOCATE_STACK (iattr, &amp;pd);\n  int retval = 0;\n\u200b\n\u200b\n  \/* Store the address of the start routine and the parameter.  Since\n     we do not start the function directly the stillborn thread will\n     get the information from its thread descriptor.  *\/\n  pd-&gt;start_routine = start_routine;\n\u200b\n\u200b\n  return retval;\n}\nversioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1);<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7 gdb \u53cd\u6c47\u7f16\u770b pthread_create \u6700\u540e\u7684\u6c47\u7f16\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u7ebf\u7a0b\u7684\u521b\u5efa\u8ddf ST \u534f\u7a0b\u7684\u521b\u5efa\u662f\u6bd4\u8f83\u7c7b\u4f3c\u7684\uff0c\u5728 pthread_create \u5b9e\u9645\u4e0a\u770b\u4e0d\u51fa\u6765 \u64cd\u4f5c\u7cfb\u7edf\u662f\u600e\u4e48\u628a\u4e0d\u540c\u7ebf\u7a0b\u5206\u914d\u5230\u4e0d\u540c\u6838\u5fc3\u8fd0\u884c\u7684\u3002\u56e0\u4e3a\u8fd8\u672a\u5f00\u59cb\u8c03\u5ea6\uff0c\u7ebf\u7a0b\u8fd8\u672a\u5f00\u59cb\u6267\u884c\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u771f\u6b63\u7684\u4ee3\u7801\u5176\u5b9e\u5728\u64cd\u4f5c\u7cfb\u7edf\u7684\u8c03\u5ea6\u51fd\u6570\u91cc\u9762\uff0c\u64cd\u4f5c\u7cfb\u7edf\u7684\u8c03\u5ea6\u4ee3\u7801\u6211\u8fd8\u672a\u770b\uff0c\u4f46\u662f\u731c\u6d4b\u4e00\u4e0b\uff0c\u64cd\u4f5c\u7cfb\u7edf\u5e94\u8be5\u662f\u7528\u4e86\u67d0\u4e2a\u6c47\u7f16\u6307\u4ee4\u628a\u4e0d\u540c\u7ebf\u7a0b\u7684\u6c47\u7f16\u4ee3\u7801\u8f7d\u5165\u4e0d\u540c\u6838\u5fc3\u7684L1\u7f13\u5b58\u3002\u7136\u540eCPU\u6838\u5fc3\u5404\u81ea\u4ece L1 \u6307\u4ee4\u7f13\u5b58\u62ff\u6570\u636e\u6765\u8fd0\u884c\uff0c\u5b9e\u9645\u4e0a\u53ef\u80fd\u662f\u8fd9\u6837\uff0c\u6307\u4ee4\u5bc4\u5b58\u5668 EIP \u53ea\u6709\u4e00\u4e2a\uff0c\u4f46\u662f EIP \u662f\u4e00\u4e2a\u5730\u5740\uff0c\u5982\u679cEIP \u6267\u884c\u6307\u4ee4\u5982\u679c\u5728\u6838\u5fc3A\u7684 L1 \u7f13\u5b58\uff0c\u6838\u5fc3A \u5c31\u4f1a\u8fd0\u884c\u3002\u6240\u4ee5\u4e0d\u540c\u7684\u6838\u5fc3 \u80af\u5b9a\u662f\u6709\u5404\u81ea \u7684 EIP \u526f\u672c\uff0c\u4e3b EIP \u53ea\u6709\u4e00\u4e2a\uff0c\u4f46\u662f\u526f\u672c\u6709\u591a\u4e2a\u3002<\/p>\n\n\n\n<p><strong>\u7ea0\u6b63\uff1a\u591a\u6838CPU\uff0c\u6bcf\u4e2a\u6838\u90fd\u6709\u4e00\u4e2aEIP \u5bc4\u5b58\u5668\u7684\u3002<\/strong><\/p>\n\n\n\n<p>\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"518\" height=\"522\" src=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-4.png\" alt=\"\" class=\"wp-image-1777\" srcset=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-4.png 518w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-4-298x300.png 298w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-4-150x150.png 150w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/figure>\n\n\n\n<p>\u5177\u4f53\u7684\u77e5\u8bc6\u5e94\u8be5\u5728\u300a\u73b0\u4ee3\u64cd\u4f5c\u7cfb\u7edf\u300b\u300a\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u300b\u300a\u6df1\u5165\u7406\u89e3\u8ba1\u7b97\u673a\u7cfb\u7edf\u300b\u91cc\u9762\uff0c\u7b49\u6211\u770b\u5b8c\u518d\u5b8c\u5584\u8fd9\u7bc7\u6587\u7ae0\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>google_ads_content<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u6211\u4eec\u77e5\u9053\uff0c\u5728 <code class=\"prettyprint\" >linux<\/code> \u73af\u5883\u7528 C \u8bed\u8a00\u5199\u7a0b\u5e8f\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u7ebf\u7a0b\u63d0\u9ad8\u8f6f\u4ef6\u7684\u5904\u7406\u80fd\u529b\uff0c\u4e5f\u5c31\u662f <code>pthread_create()<\/code> \u51fd\u6570\uff0cC\u8bed\u8a00\u591a\u7ebf\u7a0b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >#include &lt;pthread.h&gt;\nint add_two(int a,int b){\n    return a+b;\n}\nvoid* thr_fn(void *arg)\n{\n    add_two(1,8);\n    return NULL;\n}\nint  main( void )\n{\n    pthread_t ntid;\n    int err = pthread_create(&amp;ntid, NULL, thr_fn, NULL);\n    return  err;\n}<\/code><\/pre>\n\n\n\n<p>\u6211\u4eec\u8fd8\u77e5\u9053\uff0cC\u8bed\u8a00 \u4f1a\u88ab <code class=\"prettyprint\" >gcc<\/code> \u7ffb\u8bd1 \u6210\u6c47\u7f16\uff0c\u90a3\u6c47\u7f16 \u91cc\u9762\u6709\u6ca1\u6709 \u591a\u7ebf\u7a0b \u76f8\u5173\u7684\u6307\u4ee4\u5462\uff1f<\/p>\n\n\n\n<p>\u5e26\u7740\u8fd9\u4e2a\u7591\u95ee\uff0c\u6211\u4eec\u7528\u4ee5\u4e0b\u547d\u4ee4\u628a C \u8bed\u8a00\u8f6c\u6210\u6c47\u7f16\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >gcc -S -o main-thread.s main-thread.c<\/code><\/pre>\n\n\n\n<p>\u751f\u6210\u7684 64 \u4f4d\u6c47\u7f16\u4ee3\u7801\u5982\u4e0b\uff0c\u56e0\u4e3a\u662f 64\u4f4d\u7684 \u6709\u4e9b\u5bc4\u5b58\u5668\u662f <code class=\"prettyprint\" >rsp<\/code>\uff0c\u4e0d\u662f <code>esp<\/code>\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >    .file   &quot;main.c&quot;\n    .text\n    .globl  add_two\n    .type   add_two, @function\nadd_two:\n.LFB5:\n    .cfi_startproc\n    pushq   %rbp\n    .cfi_def_cfa_offset 16\n    .cfi_offset 6, -16\n    movq    %rsp, %rbp\n    .cfi_def_cfa_register 6\n    movl    %edi, -4(%rbp)\n    movl    %esi, -8(%rbp)\n    movl    -4(%rbp), %edx\n    movl    -8(%rbp), %eax\n    addl    %edx, %eax\n    popq    %rbp\n    .cfi_def_cfa 7, 8\n    ret\n    .cfi_endproc\n.LFE5:\n    .size   add_two, .-add_two\n    .globl  thr_fn\n    .type   thr_fn, @function\nthr_fn:\n.LFB6:\n    .cfi_startproc\n    pushq   %rbp\n    .cfi_def_cfa_offset 16\n    .cfi_offset 6, -16\n    movq    %rsp, %rbp\n    .cfi_def_cfa_register 6\n    subq    $8, %rsp\n    movq    %rdi, -8(%rbp)\n    movl    $8, %esi\n    movl    $1, %edi\n    call    add_two\n    movl    $0, %eax\n    leave\n    .cfi_def_cfa 7, 8\n    ret\n    .cfi_endproc\n.LFE6:\n    .size   thr_fn, .-thr_fn\n    .globl  main\n    .type   main, @function\nmain:\n.LFB7:\n    .cfi_startproc\n    pushq   %rbp\n    .cfi_def_cfa_offset 16\n    .cfi_offset 6, -16\n    movq    %rsp, %rbp\n    .cfi_def_cfa_register 6\n    subq    $32, %rsp\n    movq    %fs:40, %rax\n    movq    %rax, -8(%rbp)\n    xorl    %eax, %eax\n    leaq    -16(%rbp), %rax\n    movl    $0, %ecx\n    leaq    thr_fn(%rip), %rdx\n    movl    $0, %esi\n    movq    %rax, %rdi\n    call    pthread_create@PLT\n    movl    %eax, -20(%rbp)\n    movl    -20(%rbp), %eax\n    movq    -8(%rbp), %rdx\n    xorq    %fs:40, %rdx\n    je  .L7\n    call    __stack_chk_fail@PLT\n.L7:\n    leave\n    .cfi_def_cfa 7, 8\n    ret\n    .cfi_endproc\n.LFE7:\n    .size   main, .-main\n    .ident  &quot;GCC: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0&quot;\n    .section    .note.GNU-stack,&quot;&quot;,@progbits<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\uff0c\u6700\u7cbe\u9ad3\u7684\u662f\u4e0b\u9762\u622a\u56fe\u51fa\u6765\u8fd9\u4e00\u884c\uff0c\u8bf7\u770b\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"527\" src=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-1.png\" alt=\"\" class=\"wp-image-1099\"\/><\/figure>\n\n\n\n<p>\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u51fa\uff0c \u6c47\u7f16\u4ee3\u7801 \u4f7f\u7528\u4e86 <code class=\"prettyprint\" >call<\/code> \u6307\u4ee4\u6765\u8c03\u7528 \u64cd\u4f5c\u7cfb\u7edf\u7684 <code>pthread_create<\/code> \u51fd\u6570\uff0c\u540e\u9762\u7684 <code>@PLT<\/code> \u662f Process Link Table \u8fc7\u7a0b\u94fe\u63a5\u8868 \u7684\u7f29\u5199\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u58f0\u660e\u4e00\u4e0b\uff0c\u6307\u4ee4\u5e76\u884c\u4e3b\u8981\u6709\u4e24\u79cd\u6280\u672f\uff1a<\/p>\n\n\n\n<p>1\uff0c<code class=\"prettyprint\" >Instruction-Level Parallelism<\/code> \u6307\u4ee4\u7ea7\u522b\u6280\u672f\uff0c\u5355\u6838\u91cc\u9762\u8bbe\u8ba1\u4e86\u591a\u4e2a\u5355\u5143\u6765\u5e76\u884c\u4e0d\u540c\u7684\u6307\u4ee4\uff0c\u8fd9\u4e2a\u6280\u672f\u672c\u6587\u4e0d\u8bb2\u3002<\/p>\n\n\n\n<p>\u6307\u4ee4\u7ea7\u522b\u6280\u672f \u5177\u4f53\u7684 \u8bf7\u770b \u300a\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784-\u91cf\u5316\u7814\u7a76\u65b9\u6cd5\u300b\u7b2c3\u7ae0\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-2-1024x768.jpg\" alt=\"\" class=\"wp-image-1606\" srcset=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-2-1024x768.jpg 1024w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-2-300x225.jpg 300w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-2-768x576.jpg 768w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-2-1536x1152.jpg 1536w, https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-2.jpg 1706w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>2\uff0c<code class=\"prettyprint\" >Thread-Level Parallelism<\/code> , \u7ebf\u7a0b\u7ea7\u522b\u5e76\u884c\u6280\u672f\uff0c\u4e3b\u8981\u7528\u4e8e\u591a\u6838\u3002<strong>\u8fd9\u662f\u672c\u6587\u7684\u91cd\u70b9<\/strong>\uff0c\u4e5f\u5c31\u662f <code>pthread_create<\/code> \u51fd\u6570\u5e95\u5c42\u4f7f\u7528\u7684\u6280\u672f<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u903b\u8f91\u662f\u8fd9\u6837\u7684\uff0c\u591a\u7ebf\u7a0b\u662f\u64cd\u4f5c\u7cfb\u7edf\u5c01\u88c5\u7684\u4e1c\u897f\uff0c\u5982\u679cCPU\u662f\u5355\u6838\u7684\uff0c\u90a3\u6574\u4f53\u6765\u8bf4\uff0c\u4e0d\u540c\u7684\u7a0b\u5e8f\u90fd\u662f\u4e0d\u65ad\u5730\u5207\u6362CPU\u65f6\u95f4\u7247\uff0c\u673a\u5668\u6307\u4ee4\u5e76\u884c \u53ea\u80fd\u7528 <code class=\"prettyprint\" >Instruction-Level Parallelism<\/code> \u6280\u672f\uff0c\u600e\u4e48\u5207\u6362\u7a0b\u5e8f\uff0c\u662f\u64cd\u4f5c\u7cfb\u7edf\u5e72\u7684\u4e8b\u60c5\u3002<\/p>\n\n\n\n<p>\u5728\u591a\u6838\u60c5\u51b5\u4e0b\uff0c\u600e\u4e48\u8ba9\u591a\u6761\u673a\u5668\u6307\u4ee4\u5e76\u884c\u6267\u884c\uff0c\u5176\u5b9e\u4e5f\u662f\u64cd\u4f5c\u7cfb\u7edf\u5e72\u7684\u4e8b\u60c5\uff0c\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u4e86\u591a\u7ebf\u7a0b\u7684API \u63a5\u53e3\uff0c\u544a\u8bc9\u7a0b\u5e8f\u5458\uff0c\u4f60\u4f7f\u7528\u8fd9\u4e2a <code class=\"prettyprint\" >pthread_create<\/code> \u63a5\u53e3\uff0c\u6211\u64cd\u4f5c\u7cfb\u7edf\u4f1a<strong>\u5c3d\u91cf<\/strong> \uff0c<strong>\u5c3d\u91cf<\/strong>\u8ba9\u4f60\u4e0d\u540c\u7684\u7ebf\u7a0b\u7684\u673a\u5668\u6307\u4ee4\u80fd\u591f\u5728\u4e0d\u540c\u7684CPU\u6838\u5fc3\u4e0a \u5e76\u884c\u6267\u884c\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6ce8\u610f\uff0c\u5373\u4f7f\u662f\u591a\u6838\u7684CPU\uff0c\u5bc4\u5b58\u5668\u7684\u6570\u91cf\u4e5f\u662f\u4e0d\u53d8\u7684\uff0c\u4f8b\u598232\u4f4d\u901a\u7528\u5bc4\u5b58\u5668\u6709 8\u4e2a\uff0cEAX ~ EDI\uff0c\u53cc\u6838CPU\u53ea\u6709\u8fd9\u4e48\u591a\u5bc4\u5b58\u5668\uff0c4\u6838CPU\u4e5f\u662f\u53ea\u6709\u8fd9\u4e48\u591a\u5bc4\u5b58\u5668\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u673a\u5668\u6307\u4ee4\u5e76\u884c\uff0c\u5fc5\u987b\u662f\u4e24\u4e2a\u6307\u4ee4\u64cd\u4f5c\u4e0d\u540c\u7684\u5bc4\u5b58\u5668\uff0c\u5b83\u624d\u80fd\u5e76\u884c\uff0c\u8981\u4e0d\u591a\u4e2a\u6838\u5fc3\u62a2\u5bc4\u5b58\u5668\uff0c\u53ea\u80fd\u4e0d\u65ad\u538b\u6808\u5f39\u6808\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765 \u5c31\u8bb2\u89e3\u4e00\u4e9b \u5728 \u6c47\u7f16\u91cc\u9762 \u4e0d\u8c03 \u64cd\u4f5c\u7cfb\u7edf\u7684 \u7ebf\u7a0b\u51fd\u6570\uff0c\u600e\u4e48\u8ba9 \u6c47\u7f16\u6307\u4ee4 \u5e76\u884c\uff1f<\/p>\n\n\n\n<p>\u56e0\u4e3a <code class=\"prettyprint\" >pthread_create<\/code> \u4e5f\u662f\u673a\u5668\u7801\u5b9e\u73b0\u7684\uff0c\u80af\u5b9a\u6709\u76f8\u5173\u7684\u673a\u5668\u7801\u6307\u4ee4\uff0c\u8ba9\u4e0d\u540c\u7684\u6838\u5fc3\u6267\u884c\u4e0d\u540c\u7684\u6307\u4ee4\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u4e0b\u9762\u5f00\u59cb\u8bb2\u89e3 <strong>Thread-Level Parallelism<\/strong>\uff08\u7ebf\u7a0b\u7ea7\u5e76\u884c\uff09\u7684\u76f8\u5173\u539f\u7406\u3002\u8fd9\u65b9\u9762\u7684\u6280\u672f\uff0c\u6211\u81ea\u5df1\u4e5f\u4e0d\u662f\u7279\u522b\u61c2\uff0c\u63a8\u8350\u51e0\u4e2a\u4e13\u4e1a\u7684\u4e66\u7c4d\uff0c\u81ea\u884c\u89c2\u770b\u3002<\/p>\n\n\n\n<p>1\uff0c\u300a\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784-\u91cf\u5316\u7814\u7a76\u65b9\u6cd5\u300b\u7b2c5\u7ae0\uff0c\u8bb2\u5f97\u6bd4\u8f83\u8be6\u7ec6\u3002<\/p>\n\n\n\n<p>2\uff0c<a href=\"https:\/\/www.intel.cn\/content\/www\/cn\/zh\/architecture-and-technology\/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html\">\u300a\u82f1\u7279\u5c14\u00ae 64 \u4f4d\u548c IA-32 \u67b6\u6784\u5f00\u53d1\u4eba\u5458\u624b\u518c\uff1a\u5377 3A\u300b<\/a>\uff0c\u4e13\u95e8\u6709\u4e00\u7ae0\u662f\u8bb2\u591a\u6838\u7684\u3002<\/p>\n\n\n\n<p>\u53cd\u6b63\u65e0\u8bba \u6307\u4ee4\u7ea7\u522b\u5e76\u884c\uff0c\u8fd8\u662f\u7ebf\u7a0b \u7ea7\u522b\u5e76\u884c\uff0c\u90fd\u662f\u64cd\u4f5c\u7cfb\u7edf\u5c01\u88c5\u597d\u7684\u4e1c\u897f\u3002<\/p>\n\n\n\n<p><strong>\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e0a\u4f7f\u7528 \u6c47\u7f16\uff0c\u5982\u679c\u60f3\u8ba9 \u6307\u4ee4\u5e76\u884c\uff0c\u5145\u5206\u5229\u7528\u591a\u6838\uff0c\u53ea\u9700\u8981\u5b66\u4f1a \u6c47\u7f16\u91cc\u9762\u5982\u4f55\u8c03 <code class=\"prettyprint\" >pthread_create<\/code> \u51fd\u6570\u5c31\u884c\u3002<\/strong><\/p>\n\n\n\n<p>\u4e0b\u9762\u5c31\u6765\u8bb2\u8bb2 \u6c47\u7f16\u91cc\u9762\u5982\u4f55\u8c03 <code class=\"prettyprint\" >pthread_create<\/code> \u51fd\u6570<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u6211\u5728\u7f51\u4e0a\u6ca1\u627e\u5230 \u600e\u4e48\u6837\u5f80 \u5bc4\u5b58\u5668 \u5199\u6570\u636e \uff0c\u518d \u8c03 <code class=\"prettyprint\" >pthread_create<\/code> \u51fd\u6570\uff0c\u4e0d\u77e5\u9053 <code>pthread_create<\/code> \u662f\u53d6\u4e86\u54ea\u4e9b\u5bc4\u5b58\u5668\u4f5c\u4e3a\u53c2\u6570\u3002\u672c\u4eba\u53ea\u627e\u5230\u4e00\u4e2a\u95ee\u9898\u5e16\u5b50\uff0c<a href=\"https:\/\/mlog.club\/article\/6077770\">\u300a\u8c03\u7528pthread_create\u65f6\u5e94\u5c06\u54ea\u4e9b\u503c\u8bbe\u7f6e\u4e3a\u5bc4\u5b58\u5668\u300b<\/a><\/p>\n\n\n\n<p>\u4e00\u822c\u90fd\u662f\u5728 C\u8bed\u8a00\u91cc\u9762\u5d4c\u5165\u6c47\u7f16\u4ee3\u7801\uff0c\u6240\u4ee5\u76f4\u63a5\u7528C\u8bed\u8a00\u8c03 <code class=\"prettyprint\" >pthread_create<\/code> \u51fd\u6570 \u5c31\u884c\uff0c\u5982\u679c\u4e00\u5b9a\u8981\u7528\u624b\u5199\u6c47\u7f16\u6765\u8c03 <code>pthread_create<\/code> \u51fd\u6570\uff0c\u53ef\u4ee5\u53cd\u6c47\u7f16 C \u4ee3\u7801\uff0c\u7167\u7740\u6765\u6284\u53c2\u6570\u3002C \u8bed\u8a00\u5982\u4f55\u5d4c\u5165 \u6c47\u7f16\u4ee3\u7801\uff0c\u8bf7\u9605\u8bfb\u300a<a href=\"https:\/\/www.xianwaizhiyin.net\/?p=1104\">X86\u6c47\u7f16\u5165\u95e8-\u5982\u4f55\u5728C\u8bed\u8a00\u4e2d\u4f7f\u7528\u6c47\u7f16<\/a>\u300b<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u6269\u5c55\u77e5\u8bc6\uff1a<\/p>\n\n\n\n<p>1\uff0cwindows \u7cfb\u7edf \u7684\u6c47\u7f16 call \u6709\u6807\u51c6\u5b9a\u4e49\uff0c<a href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/build\/x64-calling-convention?view=msvc-170#:~:text=1%20Calling%20convention%20defaults.%20The%20x64%20Application%20Binary,non-volatile%20registers.%20A%20non-leaf%20function%20may...%20More%20\">\u6587\u6863\u94fe\u63a5<\/a>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u76f8\u5173\u9605\u8bfb\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/item.jd.com\/12553439.html\">\u300aComputer Architecture: A Quantitative Approach\u300b<\/a>\uff0c\u300a<a href=\"https:\/\/item.jd.com\/12553439.html\">\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784-\u91cf\u5316\u7814\u7a76\u65b9\u6cd5\u300b<\/a><\/li><li><a href=\"https:\/\/godbolt.org\/\">https:\/\/godbolt.org\/<\/a><\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u7531\u4e8e\u7b14\u8005\u7684\u6c34\u5e73\u6709\u9650\uff0c \u52a0\u4e4b\u7f16\u5199\u7684\u540c\u65f6\u8fd8\u8981\u53c2\u4e0e\u5f00\u53d1\u5de5\u4f5c\uff0c\u6587\u4e2d\u96be\u514d\u4f1a\u51fa\u73b0\u4e00\u4e9b\u9519\u8bef\u6216\u8005\u4e0d\u51c6\u786e\u7684\u5730\u65b9\uff0c\u6073\u8bf7\u8bfb\u8005\u6279\u8bc4\u6307\u6b63\u3002\u5982\u679c\u8bfb\u8005\u6709\u4efb\u4f55\u5b9d\u8d35\u610f\u89c1\uff0c\u53ef\u4ee5\u52a0\u6211\u5fae\u4fe1 Loken1\uff0cQQ\uff1a2338195090\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51e0\u4e4e\u6bcf\u4e2a\u505a\u5e94\u7528\u5f00\u53d1\u7684\u5de5\u7a0b\u5e08\uff0c\u5b66\u4e60\u6c47\u7f16\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u9047\u5230\u8fd9\u6837\u4e00\u4e2a\u56f0\u60d1\uff0c\u5404\u79cd\u6c47\u7f16\u4e66\u7c4d\uff0c\u4f8b\u5982\u300a\u6c47\u7f16\u8bed\u8a00 \u57fa\u4e8ex86\u300b\u300a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1097","post","type-post","status-publish","format-standard","hentry","category-assembly"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b - \u5f26\u5916\u4e4b\u97f3<\/title>\n<meta name=\"description\" content=\"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xianwaizhiyin.net\/?p=1097\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b - \u5f26\u5916\u4e4b\u97f3\" \/>\n<meta property=\"og:description\" content=\"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xianwaizhiyin.net\/?p=1097\" \/>\n<meta property=\"og:site_name\" content=\"\u5f26\u5916\u4e4b\u97f3\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-02T08:32:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-10T18:33:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"loken\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#website\",\"url\":\"https:\/\/www.xianwaizhiyin.net\/\",\"name\":\"\u5f26\u5916\u4e4b\u97f3\",\"description\":\"FFmpeg\u3001WebRTC\uff0cSRS \u97f3\u89c6\u9891\u3001\u6d41\u5a92\u4f53\u6280\u672f\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xianwaizhiyin.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=1097#primaryimage\",\"inLanguage\":\"zh-Hans\",\"url\":\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png\",\"contentUrl\":\"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png\",\"width\":649,\"height\":371},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=1097#webpage\",\"url\":\"https:\/\/www.xianwaizhiyin.net\/?p=1097\",\"name\":\"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b - \u5f26\u5916\u4e4b\u97f3\",\"isPartOf\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=1097#primaryimage\"},\"datePublished\":\"2022-03-02T08:32:16+00:00\",\"dateModified\":\"2022-06-10T18:33:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3\"},\"description\":\"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b\",\"breadcrumb\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=1097#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xianwaizhiyin.net\/?p=1097\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=1097#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.xianwaizhiyin.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3\",\"name\":\"loken\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#personlogo\",\"inLanguage\":\"zh-Hans\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g\",\"caption\":\"loken\"},\"sameAs\":[\"https:\/\/www.xianwaizhiyin.net\/\"],\"url\":\"https:\/\/www.xianwaizhiyin.net\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b - \u5f26\u5916\u4e4b\u97f3","description":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xianwaizhiyin.net\/?p=1097","og_locale":"zh_CN","og_type":"article","og_title":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b - \u5f26\u5916\u4e4b\u97f3","og_description":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b","og_url":"https:\/\/www.xianwaizhiyin.net\/?p=1097","og_site_name":"\u5f26\u5916\u4e4b\u97f3","article_published_time":"2022-03-02T08:32:16+00:00","article_modified_time":"2022-06-10T18:33:20+00:00","og_image":[{"url":"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"loken","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.xianwaizhiyin.net\/#website","url":"https:\/\/www.xianwaizhiyin.net\/","name":"\u5f26\u5916\u4e4b\u97f3","description":"FFmpeg\u3001WebRTC\uff0cSRS \u97f3\u89c6\u9891\u3001\u6d41\u5a92\u4f53\u6280\u672f","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xianwaizhiyin.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"ImageObject","@id":"https:\/\/www.xianwaizhiyin.net\/?p=1097#primaryimage","inLanguage":"zh-Hans","url":"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png","contentUrl":"https:\/\/www.xianwaizhiyin.net\/wp-content\/uploads\/2022\/03\/x86-8-3.png","width":649,"height":371},{"@type":"WebPage","@id":"https:\/\/www.xianwaizhiyin.net\/?p=1097#webpage","url":"https:\/\/www.xianwaizhiyin.net\/?p=1097","name":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b - \u5f26\u5916\u4e4b\u97f3","isPartOf":{"@id":"https:\/\/www.xianwaizhiyin.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xianwaizhiyin.net\/?p=1097#primaryimage"},"datePublished":"2022-03-02T08:32:16+00:00","dateModified":"2022-06-10T18:33:20+00:00","author":{"@id":"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3"},"description":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b","breadcrumb":{"@id":"https:\/\/www.xianwaizhiyin.net\/?p=1097#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xianwaizhiyin.net\/?p=1097"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.xianwaizhiyin.net\/?p=1097#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.xianwaizhiyin.net\/"},{"@type":"ListItem","position":2,"name":"X86\u6c47\u7f16\u5165\u95e8-\u591a\u7ebf\u7a0b"}]},{"@type":"Person","@id":"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3","name":"loken","image":{"@type":"ImageObject","@id":"https:\/\/www.xianwaizhiyin.net\/#personlogo","inLanguage":"zh-Hans","url":"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g","caption":"loken"},"sameAs":["https:\/\/www.xianwaizhiyin.net\/"],"url":"https:\/\/www.xianwaizhiyin.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts\/1097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1097"}],"version-history":[{"count":10,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts\/1097\/revisions"}],"predecessor-version":[{"id":2629,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts\/1097\/revisions\/2629"}],"wp:attachment":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}