---
title: vfs_context_create
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: kernel/1562360-vfs_context_create
---

# vfs_context_create

Create a new vfs_context_t with appropriate references held.

## Declaration

```occ
vfs_context_t vfs_context_create(vfs_context_t ctx);
```

## Parameters

- `ctx`: Context to copy, or NULL to use information from running thread.

## Return Value

Return Value The new context, or NULL in the event of failure.

## Discussion

Discussion The context must be released with vfs_context_rele() when no longer in use.
