1 /* -*- c-basic-offset: 2 -*- */
2 /*
3   Copyright(C) 2015-2016 Brazil
4   Copyright(C) 2018 Kouhei Sutou <kou@clear-code.com>
5 
6   This library is free software; you can redistribute it and/or
7   modify it under the terms of the GNU Lesser General Public
8   License as published by the Free Software Foundation; either
9   version 2.1 of the License, or (at your option) any later version.
10 
11   This library is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   Lesser General Public License for more details.
15 
16   You should have received a copy of the GNU Lesser General Public
17   License along with this library; if not, write to the Free Software
18   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20 module groonga_d.thread;
21 
22 
23 private static import groonga_d.groonga;
24 
25 extern(C):
26 nothrow @nogc:
27 
28 //GRN_API
29 uint grn_thread_get_limit();
30 
31 //GRN_API
32 void grn_thread_set_limit(uint new_limit);
33 
34 //GRN_API
35 uint grn_thread_get_limit_with_ctx(groonga_d.groonga.grn_ctx* ctx);
36 
37 //GRN_API
38 void grn_thread_set_limit_with_ctx(groonga_d.groonga.grn_ctx* ctx, uint new_limit);
39 
40 alias grn_thread_get_limit_func = extern (C) nothrow @nogc uint function (void* data);
41 
42 //GRN_API 
43 void grn_thread_set_get_limit_func(grn_thread_get_limit_func func, void* data);
44 
45 alias grn_thread_set_limit_func = extern (C) nothrow @nogc void function (uint new_limit, void* data);
46 
47 //GRN_API
48 void grn_thread_set_set_limit_func(grn_thread_set_limit_func func, void* data);
49 
50 alias grn_thread_get_limit_with_ctx_func = extern (C) nothrow @nogc uint function (groonga_d.groonga.grn_ctx* ctx, void* data);
51 
52 //GRN_API
53 void grn_thread_set_get_limit_with_ctx_func(grn_thread_get_limit_with_ctx_func func, void* data);
54 
55 alias grn_thread_set_limit_with_ctx_func = extern (C) nothrow @nogc void function (groonga_d.groonga.grn_ctx* ctx, uint new_limit, void* data);
56 
57 //GRN_API
58 void grn_thread_set_set_limit_with_ctx_func(grn_thread_set_limit_with_ctx_func func, void* data);