Skip to Content
C语言核心技术(原书第2版)
book

C语言核心技术(原书第2版)

by Peter Prinz, Tony Crawford
August 2017
Intermediate to advanced
798 pages
17h 44m
Chinese
China Machine Press
Content preview from C语言核心技术(原书第2版)
标准头
|
303
标准头
carg() cimag() conj() cproj() creal()
如果调用这些宏时传入实数参数,那么调用的函数是实数浮点类型参数所对应的复数浮
点版本。
threads.h
头文件
threads.h
是
C11
新引入的内容,声明了支持多线程的函数,并定义了相关的类型
和宏。头文件
threads.h
也包括了头文件
time.h
。针对
C11
特性的多线程编程的细节和示
例,请参见第
14
章。
在
C11
中对多线程的支持是可选的:定义了宏
__STDC_NO_THREADS__
的实现版本,不支持
头文件
threads.h
。
定义在
threads.h
中的函数和类型都是关于线程、互斥对象、条件变量与线程存储的。相
应地,这些函数与类型的名称均以
thrd_
、
mtx_
、
cnd_
和
tss_
作为前缀。其他采用前述
任一前缀、后接小写字母的名称被保留以为后续扩展。
定义在threads.h中的类型
thrd_t
该类型的对象表示一个线程。
thrd_start_t
类型
int (*)(void*)
(
指向函数的指针,该函数以空指针作为参数,并且返回一个
整数)。它是一个函数指针类型,且作为一个参数传递给函数
thrd_create()
,以指
示函数一个新的线程将会运行。
mtx_t
该类型的对象表示一个互斥。
cnd_t
该类型的对象表示一个条件变量。
tss_t
该类型的对象表示一个指向线程存储的指针。
tss_dtor_t
类型
void (*)(void*)
(指向函数的指针,该函数以空指针作为参数,并且无返回
值)。它是一个函数指针类型,且作为一个参数传递给函数 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

算法精讲视频课程:24篇系列讲座

算法精讲视频课程:24篇系列讲座

罗伯特·塞奇威克, 凯文·韦恩(Kevin Wayne)

Publisher Resources

ISBN: 9787111562207