---
title: setOptions
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/osset/1535177-setoptions
---

# setOptions

Recursively sets option bits in the set and all child collections.

## Declaration

```occ
virtual unsigned int setOptions(unsigned int options, unsigned int mask, void *context);
```

## Parameters

- `options`: A bitfield whose values turn the options on (1) or off (0).
- `mask`: A mask indicating which bits in options to change. Pass 0 to get the whole current options bitfield without changing any settings.
- `context`: Unused.

## Return Value

Return Value The options bitfield as it was before the set operation.

## Discussion

Discussion Kernel extensions should not call this function. Child collections' options are changed only if the receiving set's options actually change.
