摘要: fork fork()与vfock()都是创建一个进程,那他们有什么区别呢?总结有以下三点区别:1. fork ():子进程拷贝父进程的数据段,代码段 vfork ( ):子进程与父进程共享数据段2. fork ()父子进程的执行次序不确定 vfork 保证子进程先运行,在调用exec 或exit 阅读全文
posted @ 2021-07-17 19:36 aspirs 阅读(48) 评论(0) 推荐(0) 编辑
摘要: atomic operations int atomic_xchg ( volatile __global int *p, int val) Description Swaps the old value stored at location p with new value given by va 阅读全文
posted @ 2021-07-17 16:31 aspirs 阅读(65) 评论(0) 推荐(0) 编辑