Toggle main menu visibility
Main Page
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Files
File List
Globals
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
Variables
Typedefs
a
b
d
e
f
i
l
m
n
p
q
r
s
t
u
v
w
Enumerations
a
b
c
e
h
i
j
l
m
o
p
q
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
x
Macros
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
▼
Aerospike C Client API
Introduction
►
Data Structures
▼
Files
▼
File List
▼
aerospike
aerospike.h
►
aerospike_batch.h
►
aerospike_index.h
►
aerospike_info.h
►
aerospike_key.h
►
aerospike_query.h
►
aerospike_scan.h
►
aerospike_stats.h
►
aerospike_txn.h
►
aerospike_udf.h
►
as_address.h
►
as_admin.h
►
as_aerospike.h
►
as_arch.h
►
as_arraylist.h
►
as_arraylist_iterator.h
►
as_async.h
►
as_async_proto.h
►
as_atomic.h
►
as_atomic_gcc.h
►
as_atomic_win.h
►
as_batch.h
►
as_bin.h
►
as_bit_operations.h
►
as_boolean.h
►
as_buffer.h
►
as_buffer_pool.h
►
as_bytes.h
►
as_cdt_ctx.h
►
as_cdt_internal.h
►
as_cdt_order.h
►
as_cluster.h
►
as_command.h
►
as_config.h
►
as_conn_pool.h
►
as_cpu.h
►
as_dir.h
►
as_double.h
►
as_error.h
►
as_event.h
►
as_event_internal.h
►
as_exp.h
►
as_exp_operations.h
►
as_geojson.h
►
as_hashmap.h
►
as_hashmap_iterator.h
►
as_hll_operations.h
►
as_host.h
►
as_info.h
►
as_integer.h
►
as_iterator.h
►
as_job.h
►
as_key.h
►
as_latency.h
►
as_list.h
►
as_list_iterator.h
►
as_list_operations.h
►
as_listener.h
►
as_log.h
►
as_log_macros.h
►
as_lookup.h
►
as_map.h
►
as_map_iterator.h
►
as_map_operations.h
►
as_metrics.h
►
as_metrics_writer.h
►
as_module.h
►
as_monitor.h
►
as_msgpack.h
►
as_msgpack_ext.h
►
as_msgpack_serializer.h
►
as_nil.h
►
as_node.h
►
as_operations.h
►
as_orderedmap.h
►
as_pair.h
►
as_partition.h
►
as_partition_filter.h
►
as_partition_tracker.h
►
as_password.h
►
as_peers.h
►
as_pipe.h
►
as_policy.h
►
as_poll.h
►
as_proto.h
►
as_query.h
►
as_query_validate.h
►
as_queue.h
►
as_queue_mt.h
►
as_random.h
►
as_rec.h
►
as_record.h
►
as_record_iterator.h
►
as_result.h
►
as_scan.h
►
as_serializer.h
►
as_shm_cluster.h
►
as_sleep.h
►
as_socket.h
►
as_status.h
►
as_std.h
►
as_stream.h
►
as_string.h
►
as_string_builder.h
►
as_stringmap.h
►
as_thread.h
►
as_thread_pool.h
►
as_timer.h
►
as_tls.h
►
as_txn.h
►
as_txn_monitor.h
as_types.h
►
as_udf.h
►
as_udf_context.h
►
as_util.h
►
as_val.h
►
as_vector.h
►
ssl_util.h
►
version.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
as_thread.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008-2022 Aerospike, Inc.
3
*
4
* Portions may be licensed to Aerospike, Inc. under one or more contributor
5
* license agreements.
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
8
* use this file except in compliance with the License. You may obtain a copy of
9
* the License at http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
* License for the specific language governing permissions and limitations under
15
* the License.
16
*/
17
#pragma once
18
19
#include <pthread.h>
20
#include <stdio.h>
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
#define AS_THREAD_NAME_MAX 16
27
28
/**
29
* Assign thread name. Must be called in the thread to be named.
30
*/
31
static
inline
void
32
as_thread_set_name
(
const
char
* name)
33
{
34
#if defined(__APPLE__)
35
pthread_setname_np(name);
36
#else
37
pthread_setname_np(pthread_self(), name);
38
#endif
39
}
32
as_thread_set_name
(
const
char
* name) {
…
}
40
41
/**
42
* Assign thread name with index suffix. Must be called in the thread to be named.
43
*/
44
static
inline
void
45
as_thread_set_name_index
(
const
char
* name, uint32_t index)
46
{
47
char
buf[
AS_THREAD_NAME_MAX
];
48
snprintf(buf,
sizeof
(buf),
"%s%u"
, name, index);
49
as_thread_set_name
(buf);
50
}
45
as_thread_set_name_index
(
const
char
* name, uint32_t index) {
…
}
51
52
#ifdef __cplusplus
53
}
// end extern "C"
54
#endif
as_thread_set_name
static void as_thread_set_name(const char *name)
Definition
as_thread.h:32
AS_THREAD_NAME_MAX
#define AS_THREAD_NAME_MAX
Definition
as_thread.h:26
as_thread_set_name_index
static void as_thread_set_name_index(const char *name, uint32_t index)
Definition
as_thread.h:45
aerospike
as_thread.h
Generated on Tue Apr 1 2025 17:42:44 for Aerospike C Client API by
1.10.0