mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 23:34:34 +01:00
demangle partitioned counter functions, and export read_partitioned_counter, closes #23
This commit is contained in:
parent
c64a51a2be
commit
8a3d908ba3
2 changed files with 11 additions and 1 deletions
|
@ -29,6 +29,8 @@
|
||||||
db_env_set_flusher_thread_callback;
|
db_env_set_flusher_thread_callback;
|
||||||
db_env_set_num_bucket_mutexes;
|
db_env_set_num_bucket_mutexes;
|
||||||
|
|
||||||
|
read_partitioned_counter;
|
||||||
|
|
||||||
toku_ydb_error_all_cases;
|
toku_ydb_error_all_cases;
|
||||||
toku_set_trace_file;
|
toku_set_trace_file;
|
||||||
toku_close_trace_file;
|
toku_close_trace_file;
|
||||||
|
|
|
@ -122,6 +122,10 @@ PATENT RIGHTS GRANT:
|
||||||
//
|
//
|
||||||
|
|
||||||
// The old C interface. This required a bunch of explicit ___attribute__((__destructor__)) functions to remember to destroy counters at the end.
|
// The old C interface. This required a bunch of explicit ___attribute__((__destructor__)) functions to remember to destroy counters at the end.
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct partitioned_counter *PARTITIONED_COUNTER;
|
typedef struct partitioned_counter *PARTITIONED_COUNTER;
|
||||||
PARTITIONED_COUNTER create_partitioned_counter(void);
|
PARTITIONED_COUNTER create_partitioned_counter(void);
|
||||||
// Effect: Create a counter, initialized to zero.
|
// Effect: Create a counter, initialized to zero.
|
||||||
|
@ -133,7 +137,7 @@ void increment_partitioned_counter(PARTITIONED_COUNTER, uint64_t amount);
|
||||||
// Effect: Increment the counter by amount.
|
// Effect: Increment the counter by amount.
|
||||||
// Requires: No overflows. This is a 64-bit unsigned counter.
|
// Requires: No overflows. This is a 64-bit unsigned counter.
|
||||||
|
|
||||||
uint64_t read_partitioned_counter(PARTITIONED_COUNTER);
|
uint64_t read_partitioned_counter(PARTITIONED_COUNTER) __attribute__((__visibility__("default")));
|
||||||
// Effect: Return the current value of the counter.
|
// Effect: Return the current value of the counter.
|
||||||
|
|
||||||
void partitioned_counters_init(void);
|
void partitioned_counters_init(void);
|
||||||
|
@ -142,6 +146,10 @@ void partitioned_counters_init(void);
|
||||||
void partitioned_counters_destroy(void);
|
void partitioned_counters_destroy(void);
|
||||||
// Effect: Destroy any partitioned counters data structures.
|
// Effect: Destroy any partitioned counters data structures.
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include "fttypes.h"
|
#include "fttypes.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue