_putchar_nolock, _putwchar_nolock

잠금 없이 stdout에 문자를 씁니다.

구문

int _putchar_nolock(
   int c
);
wint_t _putwchar_nolock(
   wchar_t c
);

매개 변수

c
쓸 문자입니다.

반환 값

putchar, putwchar을 참조하세요.

설명

putchar_nolock_putwchar_nolock은(는) 다른 스레드의 간섭으로부터 보호되지 않는다는 점을 제외하면 _nolock 접미사가 없는 버전과 동일합니다. 이들은 다른 스레드를 잠그는 오버헤드를 유발하지 않으므로 속도가 더 빠를 수 있습니다. 단일 스레드 애플리케이션과 같은 스레드로부터 안전한 컨텍스트 또는 이미 스레드 격리를 처리한 호출 범위에서만 이러한 함수를 사용합니다.

일반 텍스트 루틴 매핑

Tchar.h 루틴 _UNICODE_MBCS 정의되지 않음 정의된 _MBCS 정의된 _UNICODE
_puttchar_nolock _putchar_nolock _putchar_nolock _putwchar_nolock

요구 사항

루틴에서 반환된 값 필수 헤더
_putchar_nolock <stdio.h>
_putwchar_nolock <stdio.h> 또는 <wchar.h>

UWP(유니버설 Windows 플랫폼) 앱에서는 콘솔이 지원되지 않습니다. 콘솔에 연결된 표준 스트림 핸들, stdin, stdoutstderr은 UWP 앱의 C 런타임 함수에서 사용되기 전에 리디렉션되어야 합니다. 호환성에 대한 자세한 내용은 호환성을 참조하세요.

라이브러리

모든 버전의 C 런타임 라이브러리입니다.

예시

// crt_putchar_nolock.c
/* This program uses putchar to write buffer
* to stdout. If an error occurs, the program
* stops before writing the entire buffer.
*/

#include <stdio.h>

int main( void )
{
   FILE *stream;
   char *p, buffer[] = "This is the line of output\n";
   int  ch;

   ch = 0;

   for( p = buffer; (ch != EOF) && (*p != '\0'); p++ )
      ch = _putchar_nolock( *p );
}

출력

This is the line of output

참고 항목

스트림 I/O
fputc, fputwc
fgetc, fgetwc