* Initialize the file pointer with the specified properties. * * The ops are set with release semantics to be certain that the flags, type, * and data are visible when ops is. This is to prevent ops methods from being * called with bad data. */
| 2930 | * called with bad data. |
| 2931 | */ |
| 2932 | void |
| 2933 | finit(struct file *fp, u_int flag, short type, void *data, struct fileops *ops) |
| 2934 | { |
| 2935 | fp->f_data = data; |
| 2936 | fp->f_flag = flag; |
| 2937 | fp->f_type = type; |
| 2938 | atomic_store_rel_ptr((volatile uintptr_t *)&fp->f_ops, (uintptr_t)ops); |
| 2939 | } |
| 2940 | |
| 2941 | void |
| 2942 | finit_vnode(struct file *fp, u_int flag, void *data, struct fileops *ops) |
no outgoing calls
no test coverage detected