[library] atoi 구현하기
·
프로그래밍/C
📌 매뉴얼 (Linux)더보기NAME    atoi - convert a string to an integer: 문자열을 정수로 변환하는 함수SYNOPSIS    #include     int atoi(const char *nptr);DESCRIPTION    The atoi() function converts the initial portion of the string pointed to by nptr to int.    The behavior is the same as        strtol(nptr, NULL, 10);     except that atoi() does not detect errors.: atoi() 함수는 nptr가 가리키는 문자열의 처음 부분을 정수로 변환합니다. 동작 방식은..
[function] pthread_detach 함수 알아보기
·
프로그래밍/C
📌 매뉴얼 (Linux)더보기NAME        pthread_detach - detach a thread SYNOPSIS        #include        int pthread_detach(pthread_t thread);       Compile and link with -pthread. DESCRIPTION        The  pthread_detach() function marks the thread identified by thread as detached.       When a detached thread terminates, its resources are automatically released back to the system       without the need for..
[function] pthread_join 함수 알아보기
·
프로그래밍/C
📌 매뉴얼 (Linux)더보기NAME      pthread_join - join with a terminated thread SYNOPSIS       #include        int pthread_join(pthread_t thread, void **retval);       Compile and link with -pthread. DESCRIPTION       The pthread_join() function waits for the thread specified by thread to terminate.       If that thread has already terminated, then pthread_join() returns immediately.       The thread sp..
[function] pthread_create 함수 알아보기
·
프로그래밍/C
📌 매뉴얼 (Linux)더보기NAME      pthread_create - create a new thread SYNOPSIS       #include        int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg);       Compile and link with -pthread. DESCRIPTION       The pthread_create() function starts a new thread in the calling process.       The new thread starts execution by invoking start_routin..
[utility] get_next_line 구현하기
·
프로그래밍/C
📌 매뉴얼 (in subject)더보기Function name     get_next_line Prototype     char *get_next_line(int fd); Parameters     fd: The file descriptor to read from: 읽어온 파일 디스크립터 Return value    Read line: correct behavior / NULL: there is nothing else to read, or an error occurred: 올바른 동작은 줄 1줄 읽어오는 것이고, 읽을 게 없거나 에러가 발생하면 NULL을 반환한다 External functs     read, malloc, free Description     Write a function that r..
[library] itoa 구현하기
·
프로그래밍/C
📌 매뉴얼 (in subject)더보기Function name     do_itoa Prototype    char *do_itoa(int n); Parameters     n: the integer to convert: n: 변환할 정수 Return value     The string representing the integer. NULL if the allocation fails.: 정수를 나타내는 문자열. 할당에 실패하면 NULL External functs     malloc Description     Allocates (with malloc(3)) and returns a string representing the integer received as an argument. Negative ..