函数源码 |
Source File:ipc\sem.c |
Create Date:2022-07-27 18:19:30 |
首页 | Copyright©Brick |
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | static unsigned long copy_semid_to_user( void __user *buf, struct semid64_ds *in, int version) { switch (version) { case IPC_64: return copy_to_user(buf, in, sizeof (*in)); case IPC_OLD: { struct semid_ds out; memset (&out, 0, sizeof (out)); ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm); out.sem_otime = in->sem_otime; out.sem_ctime = in->sem_ctime; out.sem_nsems = in->sem_nsems; return copy_to_user(buf, &out, sizeof (out)); } default : return -EINVAL; } } |