Changeset View
Changeset View
Standalone View
Standalone View
contrib/zstd/lib/common/pool.h
/** | /** | ||||
* Copyright (c) 2016-present, Facebook, Inc. | * Copyright (c) 2016-present, Facebook, Inc. | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* This source code is licensed under the BSD-style license found in the | * This source code is licensed under the BSD-style license found in the | ||||
* LICENSE file in the root directory of this source tree. An additional grant | * LICENSE file in the root directory of this source tree. An additional grant | ||||
* of patent rights can be found in the PATENTS file in the same directory. | * of patent rights can be found in the PATENTS file in the same directory. | ||||
*/ | */ | ||||
#ifndef POOL_H | #ifndef POOL_H | ||||
#define POOL_H | #define POOL_H | ||||
#if defined (__cplusplus) | #if defined (__cplusplus) | ||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
#ifdef _KERNEL | |||||
#include <sys/types.h> | |||||
#else | |||||
#include <stddef.h> /* size_t */ | #include <stddef.h> /* size_t */ | ||||
#endif | |||||
typedef struct POOL_ctx_s POOL_ctx; | typedef struct POOL_ctx_s POOL_ctx; | ||||
/*! POOL_create() : | /*! POOL_create() : | ||||
Create a thread pool with at most `numThreads` threads. | Create a thread pool with at most `numThreads` threads. | ||||
`numThreads` must be at least 1. | `numThreads` must be at least 1. | ||||
The maximum number of queued jobs before blocking is `queueSize`. | The maximum number of queued jobs before blocking is `queueSize`. | ||||
`queueSize` must be at least 1. | `queueSize` must be at least 1. | ||||
Show All 31 Lines |