/*
* Copyright (c) 2006 Claus Assmann
*
* By using this file, you agree to the terms and conditions set
* forth in the license/LICENSE.3C file which can be found at the
* top level of this source code distribution.
*/
#include "sm/generic.h"
SM_RCSID("@(#)$Id: qm_tst_fill_aq.c,v 1.6 2006/12/28 05:16:20 ca Exp $")
#include "sm/assert.h"
#include "sm/magic.h"
#include "sm/error.h"
#include "sm/qmgr-int.h"
#include "sm/actdb-int.h"
#include "../qmgr/qmgr.h"
#if QMGR_TEST
/*
** QM_TST_FILL_AQ -- fill AQ with "test" transactions
**
** Parameters:
** qmgr_ctx -- QMGR context
**
** Returns:
** usual sm_error code
**
** Called by: qmgr_sched()
**
** Last code review:
** Last code change:
*/
sm_ret_T
qm_tst_fill_aq(qmgr_ctx_P qmgr_ctx)
{
sm_ret_T ret;
time_T time_now;
aq_ctx_P aq_ctx;
SM_IS_QMGR_CTX(qmgr_ctx);
aq_ctx = qmgr_ctx->qmgr_aq;
SM_IS_AQ(aq_ctx);
time_now = evthr_time(qmgr_ctx->qmgr_ev_ctx);
ret = qm_test_fill_aq(qmgr_ctx->qmgr_lctx, aq_ctx, time_now,
qmgr_ctx->qmgr_cnf.q_cnf_tot_tas,
qmgr_ctx->qmgr_cnf.q_cnf_once_tas,
qmgr_ctx->qmgr_cnf.q_cnf_max_fill_aq,
qmgr_ctx->qmgr_cnf.q_cnf_fill_rate,
qmgr_ctx->qmgr_hostname, NULL, THR_LOCK_UNLOCK);
return ret;
}
#endif /* QMGR_TEST */
syntax highlighted by Code2HTML, v. 0.9.1