#include "xdasd_trigger.h"
#include "xdasd_exec.h"
#include "xdasd_parse.h"
#include "xdasd_mqueue.h"
#include "xdasd_list.h"
#include "xdasd_log.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
static int | tr_put (void *msg) |
A MsgQueue 'put' routine for trigger script processing. | |
static void * | tr_get (void) |
A MsgQueue 'get' routine for trigger script processing. | |
static void | tr_process (void *msg) |
A MsgQueue 'process' routine for trigger script processing. | |
int | xdasd_trigger_append (Parsed *parsed) |
Execute a shell script with variable expansion on a background thread. | |
int | xdasd_trigger_init (void) |
Initialize the trigger script execution subsystem. | |
void | xdasd_trigger_exit (void) |
Cleanup the trigger script execution subsystem. | |
Variables | |
static XDList | s_list_trigger |
static MsgQueue | s_mq_trigger |
Definition in file xdasd_trigger.c.
static void* tr_get | ( | void | ) | [static] |
A MsgQueue 'get' routine for trigger script processing.
For internal use only.
Definition at line 95 of file xdasd_trigger.c.
References XDList_tag::count, XDList_tag::tail, and xdasd_list_unlink().
Referenced by xdasd_trigger_init().
static void tr_process | ( | void * | msg | ) | [static] |
A MsgQueue 'process' routine for trigger script processing.
[in] | msg | - A typeless alias for the parsed message to be processed. |
For internal use only.
Definition at line 108 of file xdasd_trigger.c.
References trigger_tag::elem, XDList_tag::head, parsed_tag::msg, XDLItem_tag::next, parsed_tag::parsed, trigger_tag::script, t, parsed_tag::triggers, xdasd_exec(), xdasd_log(), and xdasd_parse_free().
Referenced by xdasd_trigger_init().
static int tr_put | ( | void * | msg | ) | [static] |
A MsgQueue 'put' routine for trigger script processing.
[in] | msg | - A typeless alias for the message to be added to the queue. |
For internal use only.
Definition at line 62 of file xdasd_trigger.c.
References parsed_tag::elem, malloc, parsed_tag::msg, parsed_tag::parsed, parsed_tag::structsz, parsed_tag::triggers, XDAS_FIELD_COUNT, and xdasd_list_link_tail().
Referenced by xdasd_trigger_init().
XDList s_list_trigger [static] |
The trigger message queue.
Definition at line 51 of file xdasd_trigger.c.
MsgQueue s_mq_trigger [static] |
The trigger queue manager.
Definition at line 52 of file xdasd_trigger.c.
Referenced by xdasd_trigger_append(), xdasd_trigger_exit(), and xdasd_trigger_init().