Man page - unlocked_stdio(3)

Packages contains this manual

Available languages:

en fr pl ja ro zh_TW zh_CN

Manual

UNLOCKED_STDIO

NAME
SYNOPSIS 总 览
DESCRIPTION 描 述
CONFORMING TO 标 准 参 考
SEE ALSO 参 见


NAME

*_unlocked - 非 锁 定 的 标 准 输 入 输 出 函 数

SYNOPSIS 总 览

#include <stdio.h>

int getc_unlocked(FILE * stream );
int getchar_unlocked(void);
int putc_unlocked(int
c , FILE * stream );
int putchar_unlocked(int
c );

#define _BSD_SOURCE /* or _SVID_SOURCE or _GNU_SOURCE */
#include <stdio.h>

void clearerr_unlocked(FILE * stream );
int feof_unlocked(FILE *
stream );
int ferror_unlocked(FILE *
stream );
int fileno_unlocked(FILE *
stream );
int fflush_unlocked(FILE *
stream );
int fgetc_unlocked(FILE *
stream );
int fputc_unlocked(int
c , FILE * stream );
size_t fread_unlocked(void *
ptr , size_t size , size_t n ,
FILE *
stream );
size_t fwrite_unlocked(const void *
ptr , size_t size , size_t n ,
FILE *
stream );

#define _GNU_SOURCE
#include <stdio.h>

char *fgets_unlocked(char * s , int n , FILE * stream );
int fputs_unlocked(const char *
s , FILE * stream );

#define _GNU_SOURCE
#include <wchar.h>

wint_t getwc_unlocked(FILE * stream );
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *
stream );
wint_t fputwc_unlocked(wchar_t
wc , FILE * stream );
wint_t putwc_unlocked(wchar_t
wc , FILE * stream );
wint_t putwchar_unlocked(wchar_t
wc );
wchar_t *fgetws_unlocked(wchar_t *
ws , int n , FILE * stream );
int fputws_unlocked(const wchar_t *
ws , FILE * stream );

DESCRIPTION 描 述

这 些 函 数 中 每 一 个 都 与 它 没 有 ‘_unlocked‘ 后 缀 的 对 应 版 本 行 为 一 致 , 但 是 它 们 不 使 用 锁 定 (它 们 不 自 行 设 置 锁 定 , 也 不 判 断 是 否 有 其 他 函 数 设 置 的 锁 定 ) , 因 此 是 非 线 程 安 全 的 。 参 见 flockfile (3) 。

CONFORMING TO 标 准 参 考

下 面 四 个 函 数 getc_unlocked (), getchar_unlocked (), putc_unlocked (), putchar_unlocked () 包 含 在 POSIX.1 中 。 非 标 准 的 *_unlocked() 变 种 在 少 数 Unix 系 统 中 出 现 , 较 新 的 glibc 中 也 提 供 了 它 们 。 它 们 不 应 当 被 使 用 。

SEE ALSO 参 见

flockfile (3)

本 页 面 中 文 版 由 中 文 man 手 册 页 计 划 提 供 。
中 文 man 手 册 页 计 划 : https://github.com/man-pages-zh/manpages-zh