MCPcopy Create free account
hub / github.com/F-Stack/f-stack / finit

Function finit

freebsd/kern/kern_descrip.c:2932–2939  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

2930 * called with bad data.
2931 */
2932void
2933finit(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
2941void
2942finit_vnode(struct file *fp, u_int flag, void *data, struct fileops *ops)

Callers 15

sys_sctp_peeloffFunction · 0.85
pts_allocFunction · 0.85
pts_alloc_externalFunction · 0.85
kern_umtx.cFile · 0.85
kern_socketFunction · 0.85
kern_accept4Function · 0.85
kern_socketpairFunction · 0.85
kern_kqueueFunction · 0.85
kern_kmq_openFunction · 0.85
ksem_createFunction · 0.85
eventfd_create_fileFunction · 0.85
kern_pipeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected