mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 08:54:05 +08:00
abe70c37a2
Use mktemp to create unique path for memfd, so other thread can't find file by path. If don't do this, error will ocurr in this case: thread 1: thread2: open() -- refs = 1 open() -- refs = 2 unlink() unlink() thread1 and thread2 will map one buffer by using file path but not fd or address of buffer. Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>