Lines Matching refs:size
70 #define DUP_FROM_USER_(ptr, size, copy, ...) \
72 if (ptr != NULL && (size) != 0) { \
73 ptr = DupUserMem(ptr, size, copy); \
82 DUP_FROM_USER(ptr, size, ...) can not deal with "char *";
85 #define DUP_FROM_USER(ptr, size, ...) \
86 DUP_FROM_USER_(ptr, size, 1, ##__VA_ARGS__)
88 #define DUP_FROM_USER_NOCOPY(ptr, size, ...) \
89 DUP_FROM_USER_(ptr, size, 0, ##__VA_ARGS__)
91 #define DUP_TO_USER(ptr, size, ...) \
93 if (ptr != NULL && (size) != 0) { \
94 if (LOS_ArchCopyToUser(ptr##bak, ptr, size) != 0) { \
149 #define DUP_FIELD_FROM_USER_(ptr, field, size, copy, ...) \
151 if (ptr != NULL && ptr->field != NULL && (size) != 0) { \
152 CONST_CAST(ptr)->field = DupUserMem(ptr->field, size, copy); \
160 #define DUP_FIELD_FROM_USER(ptr, field, size, ...) \
161 DUP_FIELD_FROM_USER_(ptr, field, size, 1, ##__VA_ARGS__)
163 #define DUP_FIELD_FROM_USER_NOCOPY(ptr, field, size, ...) \
164 DUP_FIELD_FROM_USER_(ptr, field, size, 0, ##__VA_ARGS__)
218 #define DUP_FIELD_TO_USER(ptr, field, size, ...) \
220 if (ptr != NULL && ptr->field != NULL && (size) != 0) { \
221 if (LOS_ArchCopyToUser(ptr##cpybak.field, ptr->field, size) != 0 || \