> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IDStorageFactoryX::SetCpuAffinity

> IDStorageFactoryX::SetCpuAffinity

# IDStorageFactoryX::SetCpuAffinity

DirectStorage の CPU アフィニティ マスクを設定します。

## 構文

```cpp theme={null}
HRESULT SetCpuAffinity(  
         UINT64 affinity  
)  
```

### パラメーター

*affinity*\
Type: UINT64

CPU アフィニティ マスク。

### 戻り値

Type: HRESULT

標準の HRESULT エラー コード。

## 解説

DirectStorage は通常、呼び出し元のスレッドで処理を実行します。ただし、一部の処理は呼び出し元のスレッドで実行できません。そのような処理を特定の CPU コアのセットに制限するには、CPU アフィニティ マスクを設定します。

詳細については、[DirectStorage の概要](/build/console-features/storage/directstorage/directstorage-overview) の「IDStorageFileX」セクション内の「SetCPUAffinity」を参照してください。

## 要件

**ヘッダー:** dstorage\_xs.h

**ライブラリ:** dstorage\_xs.lib

**サポートされているプラットフォーム:** XBOX Series 本体

## 関連項目

[IDStorageFactoryX](/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [IDStorageFactoryX::SetDebugFlags](/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setdebugflags.md)
- [IDStorageFactoryX::SetStagingBufferSize](/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setstagingbuffersize.md)
- [IDStorageFactoryX](/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx.md)
- [DirectStorage の概要](/ja-jp/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFactoryX::CreateQueue](/ja-jp/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_createqueue.md)
