mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 01:59:26 +00:00
When running the isc_quota unit test with less than usual amount of RAM (e.g. in a CI for architectures with 32 bits of address space), the pthread_create() function fails with the "Resource temporarily unavailable (11):" error code. Add functions to get and set the thread stack size (if requested), and use these to set the thread stack size to smaller value in the isc_quota unit test.
31 lines
708 B
C
31 lines
708 B
C
/*
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
*
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
* information regarding copyright ownership.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <isc/thread.h>
|
|
|
|
/*! \file */
|
|
|
|
#ifndef THREAD_MINSTACKSIZE
|
|
#define THREAD_MINSTACKSIZE (1U * 1024 * 1024)
|
|
#endif /* ifndef THREAD_MINSTACKSIZE */
|
|
|
|
extern pthread_attr_t isc__thread_attr;
|
|
|
|
void
|
|
isc__thread_initialize(void);
|
|
|
|
void
|
|
isc__thread_shutdown(void);
|