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