콘텐츠로 바로가기

now0930 일지

이런저런 생각

  • 홈
  • 비공개
  • 강좌
  • 잔여 작업 조회
  • 위치

[태그:] shared memory

posix shared memory, p325~p335

fork로 나온 parent, child와 다르게 완전 다른 프로세스간 shared memory로 데이터를 공유할 수 있다. pi@raspberrypi:~/Project/cCode/IPC/shared_memory $ cat make_memory.c #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <sys/stat.h> #include <fcntl.h> #include <semaphore.h> #include <sys/stat.h> #include <unistd.h> #include <sys/mman.h> #define FILE_MODE 0666 int main(int argc, char **argv) { int c, fd, flags; char *ptr; off_t length; flags =…… posix shared memory, p325~p335 계속 읽기

발행일 2020-07-22
카테고리 생활코딩 태그 c, linux, network program, semaphore, shared memory

shared memory introduction, p303 ~ p315

semaphore로 process간 데이터를 주고 받을 줄 알았는데, 아니었다. semaphore로 동기하고 process간 데이터 전달은 메모리 공유로 한다. #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <sys/stat.h> #include <fcntl.h> #include <semaphore.h> #include <sys/stat.h> #include <unistd.h> #include <sys/mman.h> #define SEM_NAME “mysem” #define FILE_MODE 0666 struct shared{ sem_t mutex; int count; } shared; int main(int argc, char **argv) { int…… shared memory introduction, p303 ~ p315 계속 읽기

발행일 2020-07-21
카테고리 생활코딩 태그 c, linux, network program, semaphore, shared memory
2025 5월
일 월 화 수 목 금 토
 123
45678910
11121314151617
18192021222324
25262728293031
4월    

최신 글

  • common mode, differential mode 2025-05-11
  • signal conditioner, 신호 처리기 2025-05-10
  • strain gage 2025-05-09
  • 칼만 필터 2025-05-01
  • positioner(I/P) 2025-04-26

카테고리

  • 산업계측제어기술사
  • 삶 자국
    • 책과 영화
    • 투자
  • 생활코딩
    • LEGO
    • ROS
    • tensorflow
  • 전기기사
  • 피아노 악보

메타

  • 로그인
  • 엔트리 피드
  • 댓글 피드
  • WordPress.org

페이지

  • 소개
  • 잔여 작업 조회
    • 작업 추가
    • 작업의 사진 조회
    • 작업 수정 페이지
  • 사진
    • GPS 입력된 사진
    • 사진 조회
  • 위치
    • 하기 휴가 방문지
    • 해외 출장

태그

android bash c docker driver FSM gps java kernel LEGO linux mysql network program opcua open62541 plc programmers python raspberry reinforcementLearning ros state space system program tensorflow transfer function 경제 미국 민수 삼국지 세계사 실기 에너지 역사 유전자 일본 임베디드 리눅스 전기기사 조선 중국 채윤 코딩 테스트 통계 한국사 한국어

팔로우하세요

  • Facebook
now0930 일지
WordPress로 제작.