'잡동사니'에 해당되는 글 13315건
- 2022.10.22 피곤 기절
- 2022.10.20 ‘F_SETPIPE_SZ’ undeclared
- 2022.10.19 fftw 예제 와 복소수 처리
- 2022.10.19 tlv
- 2022.10.19 fftw 테스트(tests/bench)
- 2022.10.19 fftw cross compile
- 2022.10.19 RAMS
- 2022.10.18 linux fifo
- 2022.10.17 gdb 디버깅 타겟을 인자와 함께 실행하기
- 2022.10.17 SIGPIPE
커널이 5.4.0 이라 그런가
해당 선언을 해주어야 에러가 사라진다.
#define _GNU_SOURCE |
[링크 : https://stackoverflow.com/questions/25411892/f-setpipe-sz-undeclared]
Defining _GNU_SOURCE has nothing to do with license and everything to do with writing (non-)portable code. If you define _GNU_SOURCE, you will get:
In particular, the things from _GNU_SOURCE that you should never use are #2 and #4 above. |
[링크 : https://stackoverflow.com/questions/5582211/what-does-define-gnu-source-imply]
호환성 지정 매크로
[링크 : https://m.blog.naver.com/netiz21/150015716721]
#include <fcntl.h> 대신
#include <linux/fcntl.h> 하면 _GNU_SOURCE를 해주지 않아도 되긴 한데
다른데서 경고가 뜨니 알아서 써야 할 듯.
/usr/include/linux/fcntl.h:28:#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) /usr/include/linux/fcntl.h:29:#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) |
'Linux API > linux' 카테고리의 다른 글
iio(industrial io) 문서 (0) | 2022.11.11 |
---|---|
mkpipe 와 poll (0) | 2022.10.26 |
linux fifo (0) | 2022.10.18 |
SIGPIPE (0) | 2022.10.17 |
linux ipc 최대 데이터 길이 (0) | 2022.10.11 |
'프로그램 사용 > fft, fftw' 카테고리의 다른 글
fftw wisdom (0) | 2022.11.04 |
---|---|
FFT (0) | 2022.10.24 |
fftw 테스트(tests/bench) (0) | 2022.10.19 |
fftw cross compile (0) | 2022.10.19 |
fft (0) | 2020.11.25 |
http://www.ktword.co.kr/test/view/view.php?m_temp1=3739
'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글
vRAN (0) | 2023.08.23 |
---|---|
cordic (coordinate rotation digital computer) (0) | 2023.02.27 |
DR - Disaster Recovery Plan (0) | 2022.10.17 |
SLP - Superword Level Parallelism (0) | 2022.06.02 |
digital twin (0) | 2022.04.13 |
도대체 저 옵션들은 먼지 모르겠다.
fftw-3.3.4/tests/bench -o nthreads=2 --verbose=1 --verify 'ok10bx6bx6e11x13b' --verify 'ik10bx6bx6e11x13b' --verify 'obrd7x13v16' --verify 'ibrd7x13v16' --verify 'ofrd7x13v16' --verify 'ifrd7x13v16' --verify '//obcd7x13v16' --verify '//ibcd7x13v16' --verify '//ofcd7x13v16' --verify '//ifcd7x13v16' --verify 'obcd7x13v16' --verify 'ibcd7x13v16' --verify 'ofcd7x13v16' --verify 'ifcd7x13v16' --verify 'okd10bv127' --verify 'ikd10bv127' --verify '//obr240' --verify '//ibr240' --verify '//ofr240' --verify '//ifr240' --verify 'obr240' --verify 'ibr240' --verify 'ofr240' --verify 'ifr240' --verify '//obc240' --verify '//ibc240' --verify '//ofc240' --verify '//ifc240' --verify 'obc240' --verify 'ibc240' --verify 'ofc240' --verify 'ifc240' --verify 'ok11760e00' --verify 'ik11760e00' --verify 'obr33v31' --verify 'ibr33v31' --verify 'ofr33v31' --verify 'ifr33v31' --verify '//obc33v31' --verify '//ibc33v31' --verify '//ofc33v31' --verify '//ifc33v31' --verify 'obc33v31' --verify 'ibc33v31' |
[링크 : https://unix.stackexchange.com/questions/209753/how-do-i-check-if-fftw-installed-correctly]
+
[링크 : https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/]
[링크 : https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/fftw_test.html]
'프로그램 사용 > fft, fftw' 카테고리의 다른 글
FFT (0) | 2022.10.24 |
---|---|
fftw 예제 와 복소수 처리 (0) | 2022.10.19 |
fftw cross compile (0) | 2022.10.19 |
fft (0) | 2020.11.25 |
fftw (0) | 2020.11.25 |
[링크 : https://www.fftw.org/download.html]
./configure --prefix=/home/zhouxiaoyong/fftw3_test --disable-fortran --with-slow-timer --host=arm-none-linux-gnueabi --enable-single --enable-neon --enable-shared CC=arm-none-linux-gnueabi-gcc CFLAGS="-march=armv7-a -mfpu=neon -fPIC -ldl -mfloat-abi=softfp" |
[링크 : https://codeantenna.com/a/ztGG77F10Z]
The basic usage of FFTW is simple. A typical call to FFTW looks like: #include <fftw.h> ... { fftw_complex in[N], out[N]; fftw_plan p; ... p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE); ... fftw_one(p, in, out); ... fftw_destroy_plan(p); } For example, code to perform an in-place FFT of a three-dimensional array might look like: #include <fftw.h> ... { fftw_complex in[L][M][N]; fftwnd_plan p; ... p = fftw3d_create_plan(L, M, N, FFTW_FORWARD, FFTW_MEASURE | FFTW_IN_PLACE); ... fftwnd_one(p, &in[0][0][0], NULL); ... fftwnd_destroy_plan(p); } The following is a brief example in which the wisdom is read from a file, a plan is created (possibly generating more wisdom), and then the wisdom is exported to a string and printed to stdout. { fftw_plan plan; char *wisdom_string; FILE *input_file; /* open file to read wisdom from */ input_file = fopen("sample.wisdom", "r"); if (FFTW_FAILURE == fftw_import_wisdom_from_file(input_file)) printf("Error reading wisdom!\n"); fclose(input_file); /* be sure to close the file! */ /* create a plan for N=64, possibly creating and/or using wisdom */ plan = fftw_create_plan(64,FFTW_FORWARD, FFTW_MEASURE | FFTW_USE_WISDOM); /* ... do some computations with the plan ... */ /* always destroy plans when you are done */ fftw_destroy_plan(plan); /* write the wisdom to a string */ wisdom_string = fftw_export_wisdom_to_string(); if (wisdom_string != NULL) { printf("Accumulated wisdom: %s\n",wisdom_string); /* Just for fun, destroy and restore the wisdom */ fftw_forget_wisdom(); /* all gone! */ fftw_import_wisdom_from_string(wisdom_string); /* wisdom is back! */ fftw_free(wisdom_string); /* deallocate it since we're done */ } } |
'프로그램 사용 > fft, fftw' 카테고리의 다른 글
fftw 예제 와 복소수 처리 (0) | 2022.10.19 |
---|---|
fftw 테스트(tests/bench) (0) | 2022.10.19 |
fft (0) | 2020.11.25 |
fftw (0) | 2020.11.25 |
ffmpeg fft 분석 예제 (0) | 2020.11.25 |
Reliability(신뢰성)
Availability(가용성)
Maintainability(유지보수성)
Safety(안전성)
문서를 쓰려면 머리 아플, 테스트로 시간 엄청 들일 녀석이겠구나..
[링크 : http://www.daeati.co.kr/sub03_rams.php]
유럽 철도분야의 RAMS(Reliability, Availability, Maintainability, and Safety) 표준으로 제정한 EN50126은 시스템의 신뢰성, 가용성, 보전성 및 안전성에 대한 필수적인 요구사항을 규정하고 있다.
[링크 : https://scienceon.kisti.re.kr/srch/selectPORSrchArticle.do?cn=DIKO0010114980&dbt=DIKO]
'회사일' 카테고리의 다른 글
TMP116, TMP117 (0) | 2024.09.02 |
---|---|
imx8m plus (0) | 2021.08.27 |
항암제 (0) | 2020.01.03 |
postgresql regexp_matches 로 HGVS g. c. p. 잡아내기 (0) | 2020.01.01 |
compound heterozygosity (0) | 2019.12.21 |
특이하다면 특이하고, 당연하다면 당연하게
fifo는 쓸 녀석과, 읽을 녀석이 둘다 요청이 들어올때 까지 open() 에서 blocking 된다.
strace를 이용해서 확인해보면 각각 실행할 경우
O_RDONLY를 주던 O_WRONLY를 주던 간에 open() 함수에서 block 되어있다
두개 프로그램이 read/write pair가 만들어지면 그제서야 open()을 넘어가게 된다.
open()을 non_block 으로 해서 name pipe의 pair가 만들어지길 기다리는 것도 방법 일 듯.
$ strace ./rx openat(AT_FDCWD, "/tmp/fifo", O_RDONLY |
$ strace ./tx 2 openat(AT_FDCWD, "/tmp/fifo", O_WRONLY |
[링크 : https://tutorialspoint.dev/computer-science/operating-systems/named-pipe-fifo-example-c-program]
걍 이렇게 하고 나서 해보면 되려나?
int fifo_fd = open(fifo_path, O_RDONLY | O_NONBLOCK); FILE *fp = fdopen(fifo_fd, "r"); |
[링크 : https://cboard.cprogramming.com/c-programming/89358-nonblocking-fifo.html]
'Linux API > linux' 카테고리의 다른 글
mkpipe 와 poll (0) | 2022.10.26 |
---|---|
‘F_SETPIPE_SZ’ undeclared (0) | 2022.10.20 |
SIGPIPE (0) | 2022.10.17 |
linux ipc 최대 데이터 길이 (0) | 2022.10.11 |
ipc 성능 비교 (0) | 2022.09.21 |
예를 들어 ls -al을 하려면 아래와 같이 하면 된다.
$ gdb --args ls -al |
그냥 넣으면 gdb의 옵션으로 해석한다.
$ gdb ls -al gdb: 인식할 수 없는 옵션 '-al' Use `gdb --help' for a complete list of options. |
$ gdb --args executablename arg1 arg2 arg3 |
'프로그램 사용 > gdb & insight' 카테고리의 다른 글
gdbserver taget (0) | 2023.07.19 |
---|---|
gdb conditional break (0) | 2023.07.19 |
gdb break (0) | 2021.04.09 |
gdb/insight target window (0) | 2010.05.19 |
insight/gdb 우분투에서 컴파일하기 실패 - insight/gdb compiling on ubuntu failed (2) | 2010.05.18 |
mkfifo()를 이용하여 named pipe를 해보는데
받는 쪽이 사라지니 보내는 애가 갑자기 에러도 없이 죽어
gdb로 확인해보니 SIGPIPE가 전달되었고 그로 인해서 프로세스가 종료 된 것으로 보인다.
Program received signal SIGPIPE, Broken pipe. 0x00007ffff7af2104 in __GI___libc_write (fd=3, buf=0x7ffff76e1010, nbytes=3145728) at ../sysdeps/unix/sysv/linux/write.c:27 27 ../sysdeps/unix/sysv/linux/write.c: 그런 파일이나 디렉터리가 없습니다. |
[링크 : https://jacking75.github.io/linux_socket_sigpipe/]
gdb 에서 무시하게 하려면 아래의 명령어를 입력하라고 한다.
handle SIGPIPE nostop pass pass |
'Linux API > linux' 카테고리의 다른 글
‘F_SETPIPE_SZ’ undeclared (0) | 2022.10.20 |
---|---|
linux fifo (0) | 2022.10.18 |
linux ipc 최대 데이터 길이 (0) | 2022.10.11 |
ipc 성능 비교 (0) | 2022.09.21 |
posix message queue (0) | 2022.09.21 |