Skip to Content
우아한 C언어 코딩 패턴
book

우아한 C언어 코딩 패턴

by Christoper Preschem, 정기훈(Jung Ki Hun)
April 2024
Beginner to intermediate
364 pages
7h 2m
Korean
Insight
Content preview from 우아한 C언어 코딩 패턴
C
157
󻳓󻪼󽴔󻖐󼖫󽴔󻙛󼧓󼞇󻮷󻪃󽴔󺽷󺦗
이더넷 드라이버 사용자는 소켓에 접근하는 방법과 같은 세부 구현에 대처할
필요 없이 제공된 API를 사용하기만 하면 된다. 이 API의 두 함수는 언제든지
서로 독립적으로 호출할 수 있으며, 호출자는 소유권 및 리소스 해제를 고민할
필요 없이 함수에서 제공하는 데이터를 얻을 수 있다. 이 API를 사용하는 것은
간단하지만 매우 제한적이다.
다음으로 드라이버에 추가 기능을 제공하려 한다. 사용자가 이더넷 통신의
동작 여부를 확인할 수 있도록 송수신된 바이트 수를 보여주는 통계를 제공코
자 한다. 단순한 무상태 소프트웨어 모듈로는 이를 구현할 수 없다. 하나의 함
수 호출에서 다른 함수 호출까지 상태 정보를 보관하기 위해 별도로 확보한 메
모리가 없기 때문이다.
이를 달성하기 위해서는 전역 상태 소프트웨어 모듈(Software Module with
Global State)이 필요하다.
󻳓󻪼󽴔󻖐󼖫󽴔󻙛󼧓󼞇󻮷󻪃󽴔󺽷󺦗
󼎷󼘜󻝳󼞇
호출자에게 관련 기능이 포함된 함수를 제공하려 한다. 함수는 서로 공유되는
공통 데이터를 가지고 작업하며, 제공하는 기능을 사용할 수 있도록 함수 사용
전에 메모리를 초기화하는 등의 리소스 준비가 필요할 수 있지만, 함수는 호출
자에 종속된 상태 정보를 필요로 하지는 않는다.
󻀇󻳫
󺙋󺹻󻳐󻰋󺴫󽴔󻪿󺇏󻱃󽴔󻱗󺆯󽴔󺇄󼚄󻰧󽴔󻖐󼖫󽴔 ...
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

AI를 위한 필수 수학

AI를 위한 필수 수학

할라 넬슨
파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에
클라우드 네이티브 애플리케이션 디자인 패턴

클라우드 네이티브 애플리케이션 디자인 패턴

카순 인드라시리, 스리스칸다라자 수호티얀

Publisher Resources

ISBN: 9788966264742