Debian Codegraph @

lib/proc/proc_sleep.c

raw symbols SCIP
1 /*
2 Copyright (C) 2022 Sutou Kouhei <[email protected]>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include "../grn_proc.h"cxx . . $ `<file>/lib/grn_proc.h`/
20
21 #include <groonga/plugin.h>cxx . . $ `<file>/include/groonga/plugin.h`/
22
23 static grn_objcxx . . $ grn_obj# *
24 command_sleepcxx . . $ command_sleep(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
25 {
26 double second = grn_plugin_proc_get_var_doublecxx . . $ grn_plugin_proc_get_var_double(4687558b569ca04c).(ctx, user_data,
27 "second", -1,
28 1);
29 grn_nanosleepcxx . . $ grn_nanosleep(2c44cd906ae4e829).((uint64_tcxx . . $ uint64_t#)(second * 1000000000));
30 grn_ctx_output_boolcxx . . $ grn_ctx_output_bool(1112b62984b2cd7f).(ctx, truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
31 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
32 }
33
34 void
35 grn_proc_init_sleepcxx . . $ grn_proc_init_sleep(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx)
36 {
37 grn_expr_varcxx . . $ grn_expr_var# vars[1];
38 grn_plugin_expr_var_initcxx . . $ grn_plugin_expr_var_init(680ef4125f11597f).(ctx, &(vars[0]), "second", -1);
39 grn_plugin_command_createcxx . . $ grn_plugin_command_create(2dfd920bb40f3149).(ctx,
40 "sleep", -1,
41 command_sleepcxx . . $ command_sleep(fd082858389c8bb0).,
42 sizeof(vars) / sizeof(vars[0]),
43 vars);
44 }