๐ OS: ์ด์์ฒด์ 2 [Linux] shared memory ์์ฑ ์ฐ๊ฒฐ, ํด์ ๋ฐฉ๋ฒ shm_open SYNOPSIS #include #include /* For mode constants */ #include /* For O_* constants */ int shm_open(const char *name, int oflag, mode_t mode); int shm_unlink(const char *name); Link with -lrt. shm_open() ์๋ก์ด ํน์ ์ด๋ฏธ ์กด์ฌํ๋ POSIX shared memory๋ฅผ openํ๊ฑฐ๋ ์๋ค๋ฉด ์๋ก ์์ฑ. shm_unlink() shm_opne()์ผ๋ก ์์ฑ๋ shared memory๋ฅผ ์์ ์ค๋ค. ์์ shm_open(SHM_NAME, O_RDWR | O_CREAT, 0666); shm_unlink(SHM_NAME); 2022. 11. 6. [Ubuntu Linux] makefile ๋ง๋ค๋ ์ค๋ฅ ํด๊ฒฐ (space๋ฅผ tab์ผ๋ก ๋ณํ) makefile์ ๋ง๋ค๋ space๊ฐ ์๋๋ผ tab์ ์ฌ์ฉํด์ผ ํ๋ค! ๊ทธ๋์ ubuntu์์ //car -e -t -v "makefile์ด๋ฆ" cat -e -t -v makefile ์ ๋๋ฅด๋ฉด makefile์ tab์ด ์๋์ง ๊ณต๋ฐฑ์ธ์ง ํ์ธํ ์ ์๋๋ฐ, ๋๋ ์ด์ํ๊ฒ ์ถ๋ ฅ๋์๋ค. intro_exe : proj1.o main.o^M$ gcc -o intro_exe proj1.o main.o^M$ main.o : main.c^M$ gcc -c -o main.o main.c^M$ proj1.o : proj1.c^M$ gcc -c -o proj1.o proj1.c^M$ clean : ^M$ rm *.o intro_exe tab์ด gcc์์ ์์ผ๋๊น ^Igcc~ ์ด๋ ๊ฒ ๋์์ผ ํ๋๋ฐ ๊ตฌ๊ธ๋งํด์ ๋์ค๋ ๊ฒ๊ณผ๋ ๋ชจ.. 2022. 11. 4. ์ด์ 1 ๋ค์