Back to home page

Enduro/X

 
 

    


0001 /**
0002  * @brief Standard library debugging object API code (auto-generated)
0003  *
0004  * @file ondebug.c
0005  */
0006 /* -----------------------------------------------------------------------------
0007  * Enduro/X Middleware Platform for Distributed Transaction Processing
0008  * Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved.
0009  * Copyright (C) 2017-2023, Mavimax, Ltd. All Rights Reserved.
0010  * This software is released under one of the following licenses:
0011  * AGPL (with Java and Go exceptions) or Mavimax's license for commercial use.
0012  * See LICENSE file for full text.
0013  * -----------------------------------------------------------------------------
0014  * AGPL license:
0015  *
0016  * This program is free software; you can redistribute it and/or modify it under
0017  * the terms of the GNU Affero General Public License, version 3 as published
0018  * by the Free Software Foundation;
0019  *
0020  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0021  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0022  * PARTICULAR PURPOSE. See the GNU Affero General Public License, version 3
0023  * for more details.
0024  *
0025  * You should have received a copy of the GNU Affero General Public License along
0026  * with this program; if not, write to the Free Software Foundation, Inc.,
0027  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0028  *
0029  * -----------------------------------------------------------------------------
0030  * A commercial use license is available from Mavimax, Ltd
0031  * contact@mavimax.com
0032  * -----------------------------------------------------------------------------
0033  */
0034 #include <string.h>
0035 #include <stdio.h>
0036 #include <stdint.h>
0037 #include <stdlib.h>
0038 #include <memory.h>
0039 #include <errno.h>
0040 #include <dlfcn.h>
0041 
0042 #include <atmi.h>
0043 #include <atmi_tls.h>
0044 #include <ndrstandard.h>
0045 #include <ndebug.h>
0046 #include <ndrxdcmn.h>
0047 #include <userlog.h>
0048 #include <xa_cmn.h>
0049 /*---------------------------Externs------------------------------------*/
0050 /*---------------------------Macros-------------------------------------*/
0051 /*---------------------------Enums--------------------------------------*/
0052 /*---------------------------Typedefs-----------------------------------*/
0053 /*---------------------------Globals------------------------------------*/
0054 /*---------------------------Statics------------------------------------*/
0055 /*---------------------------Prototypes---------------------------------*/
0056 /**
0057  * Object-API wrapper for tplogdumpdiff() - Auto generated.
0058  */
0059 expublic void Otplogdumpdiff(TPCONTEXT_T *p_ctxt, int lev, char *comment, void *ptr1, void *ptr2, int len) 
0060 {
0061     int did_set = EXFALSE;
0062 
0063 
0064 #ifdef NDRX_OAPI_DEBUG
0065     NDRX_LOG(log_debug, "ENTRY: tplogdumpdiff() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0066     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0067         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0068 
0069     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0070         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0071 
0072     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0073         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0074 
0075     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0076         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0077 
0078     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0079         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0080 
0081     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0082         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0083 
0084     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0085         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0086 #endif
0087 
0088  
0089 
0090  /* set the context */
0091     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0092     {
0093          /* set the context */
0094         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0095             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0096         {
0097             userlog("ERROR! tplogdumpdiff() failed to set context");
0098         }
0099         did_set = EXTRUE;
0100     }
0101     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0102     {
0103         userlog("WARNING! tplogdumpdiff() context %p thinks that it is assocated "
0104                 "with current thread, but thread is associated with %p context!",
0105                 p_ctxt, G_atmi_tls);
0106     }
0107 
0108     tplogdumpdiff(lev, comment, ptr1, ptr2, len);
0109 
0110     if (did_set)
0111     {
0112         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0113             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0114         {
0115             userlog("ERROR! tplogdumpdiff() failed to get context");
0116         }
0117     }
0118 out:
0119 
0120 #ifdef NDRX_OAPI_DEBUG
0121     NDRX_LOG(log_debug, "RETURN: tplogdumpdiff() returns, context: %p, current: %p",
0122         *p_ctxt, G_atmi_tls);
0123 #endif
0124 
0125 
0126     return;
0127 }
0128 
0129 /**
0130  * Object-API wrapper for tplogdump() - Auto generated.
0131  */
0132 expublic void Otplogdump(TPCONTEXT_T *p_ctxt, int lev, char *comment, void *ptr, int len) 
0133 {
0134     int did_set = EXFALSE;
0135 
0136 
0137 #ifdef NDRX_OAPI_DEBUG
0138     NDRX_LOG(log_debug, "ENTRY: tplogdump() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0139     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0140         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0141 
0142     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0143         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0144 
0145     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0146         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0147 
0148     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0149         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0150 
0151     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0152         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0153 
0154     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0155         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0156 
0157     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0158         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0159 #endif
0160 
0161  
0162 
0163  /* set the context */
0164     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0165     {
0166          /* set the context */
0167         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0168             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0169         {
0170             userlog("ERROR! tplogdump() failed to set context");
0171         }
0172         did_set = EXTRUE;
0173     }
0174     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0175     {
0176         userlog("WARNING! tplogdump() context %p thinks that it is assocated "
0177                 "with current thread, but thread is associated with %p context!",
0178                 p_ctxt, G_atmi_tls);
0179     }
0180 
0181     tplogdump(lev, comment, ptr, len);
0182 
0183     if (did_set)
0184     {
0185         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0186             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0187         {
0188             userlog("ERROR! tplogdump() failed to get context");
0189         }
0190     }
0191 out:
0192 
0193 #ifdef NDRX_OAPI_DEBUG
0194     NDRX_LOG(log_debug, "RETURN: tplogdump() returns, context: %p, current: %p",
0195         *p_ctxt, G_atmi_tls);
0196 #endif
0197 
0198 
0199     return;
0200 }
0201 
0202 /**
0203  * Object-API wrapper for tplog() - Auto generated.
0204  */
0205 expublic void Otplog(TPCONTEXT_T *p_ctxt, int lev, char *message) 
0206 {
0207     int did_set = EXFALSE;
0208 
0209 
0210 #ifdef NDRX_OAPI_DEBUG
0211     NDRX_LOG(log_debug, "ENTRY: tplog() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0212     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0213         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0214 
0215     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0216         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0217 
0218     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0219         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0220 
0221     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0222         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0223 
0224     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0225         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0226 
0227     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0228         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0229 
0230     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0231         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0232 #endif
0233 
0234  
0235 
0236  /* set the context */
0237     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0238     {
0239          /* set the context */
0240         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0241             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0242         {
0243             userlog("ERROR! tplog() failed to set context");
0244         }
0245         did_set = EXTRUE;
0246     }
0247     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0248     {
0249         userlog("WARNING! tplog() context %p thinks that it is assocated "
0250                 "with current thread, but thread is associated with %p context!",
0251                 p_ctxt, G_atmi_tls);
0252     }
0253 
0254     tplog(lev, message);
0255 
0256     if (did_set)
0257     {
0258         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0259             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0260         {
0261             userlog("ERROR! tplog() failed to get context");
0262         }
0263     }
0264 out:
0265 
0266 #ifdef NDRX_OAPI_DEBUG
0267     NDRX_LOG(log_debug, "RETURN: tplog() returns, context: %p, current: %p",
0268         *p_ctxt, G_atmi_tls);
0269 #endif
0270 
0271 
0272     return;
0273 }
0274 
0275 
0276 /**
0277  * Object-API wrapper for tplogqinfo() - Auto generated.
0278  */
0279 expublic long Otplogqinfo(TPCONTEXT_T *p_ctxt, int lev, long flags) 
0280 {
0281     long ret = EXSUCCEED;
0282     int did_set = EXFALSE;
0283 
0284 
0285 #ifdef NDRX_OAPI_DEBUG
0286     NDRX_LOG(log_debug, "ENTRY: tplogqinfo() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0287     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0288         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0289 
0290     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0291         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0292 
0293     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0294         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0295 
0296     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0297         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0298 
0299     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0300         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0301 
0302     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0303         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0304 
0305     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0306         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0307 #endif
0308 
0309  
0310 
0311     /* set the context */
0312     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0313     {
0314         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0, 
0315             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0316         {
0317             userlog("ERROR! tplogqinfo() failed to set context");
0318             EXFAIL_OUT(ret);
0319         }
0320         did_set = EXTRUE;
0321     }
0322     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0323     {
0324         userlog("WARNING! tplogqinfo() context %p thinks that it is assocated "
0325                 "with current thread, but thread is associated with %p context!",
0326                 p_ctxt, G_atmi_tls);
0327     }
0328     
0329     ret = tplogqinfo(lev, flags);
0330 
0331     if (did_set)
0332     {
0333         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0, 
0334             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0335         {
0336             userlog("ERROR! tplogqinfo() failed to get context");
0337             EXFAIL_OUT(ret);
0338         }
0339     }
0340 out:
0341 
0342 #ifdef NDRX_OAPI_DEBUG
0343     NDRX_LOG(log_debug, "RETURN: tplogqinfo() returns, context: %p, current: %p",
0344         *p_ctxt, G_atmi_tls);
0345 #endif
0346 
0347  
0348     return ret; 
0349 }
0350 
0351 /**
0352  * Object-API wrapper for tplogex() - Auto generated.
0353  */
0354 expublic void Otplogex(TPCONTEXT_T *p_ctxt, int lev, char *file, long line, char *message) 
0355 {
0356     int did_set = EXFALSE;
0357 
0358 
0359 #ifdef NDRX_OAPI_DEBUG
0360     NDRX_LOG(log_debug, "ENTRY: tplogex() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0361     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0362         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0363 
0364     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0365         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0366 
0367     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0368         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0369 
0370     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0371         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0372 
0373     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0374         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0375 
0376     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0377         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0378 
0379     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0380         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0381 #endif
0382 
0383  
0384 
0385  /* set the context */
0386     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0387     {
0388          /* set the context */
0389         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0390             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0391         {
0392             userlog("ERROR! tplogex() failed to set context");
0393         }
0394         did_set = EXTRUE;
0395     }
0396     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0397     {
0398         userlog("WARNING! tplogex() context %p thinks that it is assocated "
0399                 "with current thread, but thread is associated with %p context!",
0400                 p_ctxt, G_atmi_tls);
0401     }
0402 
0403     tplogex(lev, file, line, message);
0404 
0405     if (did_set)
0406     {
0407         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0408             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0409         {
0410             userlog("ERROR! tplogex() failed to get context");
0411         }
0412     }
0413 out:
0414 
0415 #ifdef NDRX_OAPI_DEBUG
0416     NDRX_LOG(log_debug, "RETURN: tplogex() returns, context: %p, current: %p",
0417         *p_ctxt, G_atmi_tls);
0418 #endif
0419 
0420 
0421     return;
0422 }
0423 
0424 /**
0425  * Object-API wrapper for ndrxlogex() - Auto generated.
0426  */
0427 expublic void Ondrxlogex(TPCONTEXT_T *p_ctxt, int lev, char *file, long line, char *message) 
0428 {
0429     int did_set = EXFALSE;
0430 
0431 
0432 #ifdef NDRX_OAPI_DEBUG
0433     NDRX_LOG(log_debug, "ENTRY: ndrxlogex() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0434     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0435         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0436 
0437     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0438         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0439 
0440     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0441         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0442 
0443     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0444         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0445 
0446     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0447         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0448 
0449     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0450         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0451 
0452     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0453         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0454 #endif
0455 
0456  
0457 
0458  /* set the context */
0459     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0460     {
0461          /* set the context */
0462         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0463             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0464         {
0465             userlog("ERROR! ndrxlogex() failed to set context");
0466         }
0467         did_set = EXTRUE;
0468     }
0469     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0470     {
0471         userlog("WARNING! ndrxlogex() context %p thinks that it is assocated "
0472                 "with current thread, but thread is associated with %p context!",
0473                 p_ctxt, G_atmi_tls);
0474     }
0475 
0476     ndrxlogex(lev, file, line, message);
0477 
0478     if (did_set)
0479     {
0480         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0481             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0482         {
0483             userlog("ERROR! ndrxlogex() failed to get context");
0484         }
0485     }
0486 out:
0487 
0488 #ifdef NDRX_OAPI_DEBUG
0489     NDRX_LOG(log_debug, "RETURN: ndrxlogex() returns, context: %p, current: %p",
0490         *p_ctxt, G_atmi_tls);
0491 #endif
0492 
0493 
0494     return;
0495 }
0496 
0497 /**
0498  * Object-API wrapper for ubflogex() - Auto generated.
0499  */
0500 expublic void Oubflogex(TPCONTEXT_T *p_ctxt, int lev, char *file, long line, char *message) 
0501 {
0502     int did_set = EXFALSE;
0503 
0504 
0505 #ifdef NDRX_OAPI_DEBUG
0506     NDRX_LOG(log_debug, "ENTRY: ubflogex() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0507     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0508         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0509 
0510     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0511         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0512 
0513     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0514         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0515 
0516     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0517         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0518 
0519     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0520         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0521 
0522     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0523         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0524 
0525     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0526         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0527 #endif
0528 
0529  
0530 
0531  /* set the context */
0532     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0533     {
0534          /* set the context */
0535         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0536             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0537         {
0538             userlog("ERROR! ubflogex() failed to set context");
0539         }
0540         did_set = EXTRUE;
0541     }
0542     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0543     {
0544         userlog("WARNING! ubflogex() context %p thinks that it is assocated "
0545                 "with current thread, but thread is associated with %p context!",
0546                 p_ctxt, G_atmi_tls);
0547     }
0548 
0549     ubflogex(lev, file, line, message);
0550 
0551     if (did_set)
0552     {
0553         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0554             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0555         {
0556             userlog("ERROR! ubflogex() failed to get context");
0557         }
0558     }
0559 out:
0560 
0561 #ifdef NDRX_OAPI_DEBUG
0562     NDRX_LOG(log_debug, "RETURN: ubflogex() returns, context: %p, current: %p",
0563         *p_ctxt, G_atmi_tls);
0564 #endif
0565 
0566 
0567     return;
0568 }
0569 
0570 
0571 /**
0572  * Object-API wrapper for tploggetiflags() - Auto generated.
0573  */
0574 expublic char * Otploggetiflags(TPCONTEXT_T *p_ctxt) 
0575 {
0576     int did_set = EXFALSE;
0577     char * ret = NULL;
0578 
0579 
0580 #ifdef NDRX_OAPI_DEBUG
0581     NDRX_LOG(log_debug, "ENTRY: tploggetiflags() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0582     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0583         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0584 
0585     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0586         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0587 
0588     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0589         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0590 
0591     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0592         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0593 
0594     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0595         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0596 
0597     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0598         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0599 
0600     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0601         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0602 #endif
0603 
0604  
0605     
0606     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0607     {
0608         /* set the context */
0609         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0, 
0610             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0611         {
0612             userlog("ERROR! tploggetiflags() failed to set context");
0613             ret = NULL;
0614             goto out;
0615         }
0616         did_set = EXTRUE;
0617     }
0618     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0619     {
0620         userlog("WARNING! tploggetiflags() context %p thinks that it is assocated "
0621                 "with current thread, but thread is associated with %p context!",
0622                 p_ctxt, G_atmi_tls);
0623     }
0624     
0625     ret = tploggetiflags();
0626 
0627     if (did_set)
0628     {
0629         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0630                 CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0631         {
0632             userlog("ERROR! tploggetiflags() failed to get context");
0633             ret = NULL;
0634             goto out;
0635         }
0636     }
0637 out:
0638 
0639 #ifdef NDRX_OAPI_DEBUG
0640     NDRX_LOG(log_debug, "RETURN: tploggetiflags() returns, context: %p, current: %p",
0641         *p_ctxt, G_atmi_tls);
0642 #endif
0643 
0644 
0645     return ret; 
0646 }
0647 
0648 /**
0649  * Object-API wrapper for ndrxlogdumpdiff() - Auto generated.
0650  */
0651 expublic void Ondrxlogdumpdiff(TPCONTEXT_T *p_ctxt, int lev, char *comment, void *ptr1, void *ptr2, int len) 
0652 {
0653     int did_set = EXFALSE;
0654 
0655 
0656 #ifdef NDRX_OAPI_DEBUG
0657     NDRX_LOG(log_debug, "ENTRY: ndrxlogdumpdiff() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0658     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0659         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0660 
0661     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0662         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0663 
0664     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0665         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0666 
0667     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0668         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0669 
0670     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0671         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0672 
0673     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0674         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0675 
0676     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0677         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0678 #endif
0679 
0680  
0681 
0682  /* set the context */
0683     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0684     {
0685          /* set the context */
0686         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0687             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0688         {
0689             userlog("ERROR! ndrxlogdumpdiff() failed to set context");
0690         }
0691         did_set = EXTRUE;
0692     }
0693     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0694     {
0695         userlog("WARNING! ndrxlogdumpdiff() context %p thinks that it is assocated "
0696                 "with current thread, but thread is associated with %p context!",
0697                 p_ctxt, G_atmi_tls);
0698     }
0699 
0700     ndrxlogdumpdiff(lev, comment, ptr1, ptr2, len);
0701 
0702     if (did_set)
0703     {
0704         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0705             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0706         {
0707             userlog("ERROR! ndrxlogdumpdiff() failed to get context");
0708         }
0709     }
0710 out:
0711 
0712 #ifdef NDRX_OAPI_DEBUG
0713     NDRX_LOG(log_debug, "RETURN: ndrxlogdumpdiff() returns, context: %p, current: %p",
0714         *p_ctxt, G_atmi_tls);
0715 #endif
0716 
0717 
0718     return;
0719 }
0720 
0721 /**
0722  * Object-API wrapper for ndrxlogdump() - Auto generated.
0723  */
0724 expublic void Ondrxlogdump(TPCONTEXT_T *p_ctxt, int lev, char *comment, void *ptr, int len) 
0725 {
0726     int did_set = EXFALSE;
0727 
0728 
0729 #ifdef NDRX_OAPI_DEBUG
0730     NDRX_LOG(log_debug, "ENTRY: ndrxlogdump() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0731     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0732         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0733 
0734     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0735         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0736 
0737     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0738         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0739 
0740     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0741         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0742 
0743     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0744         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0745 
0746     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0747         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0748 
0749     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0750         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0751 #endif
0752 
0753  
0754 
0755  /* set the context */
0756     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0757     {
0758          /* set the context */
0759         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0760             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0761         {
0762             userlog("ERROR! ndrxlogdump() failed to set context");
0763         }
0764         did_set = EXTRUE;
0765     }
0766     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0767     {
0768         userlog("WARNING! ndrxlogdump() context %p thinks that it is assocated "
0769                 "with current thread, but thread is associated with %p context!",
0770                 p_ctxt, G_atmi_tls);
0771     }
0772 
0773     ndrxlogdump(lev, comment, ptr, len);
0774 
0775     if (did_set)
0776     {
0777         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0778             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0779         {
0780             userlog("ERROR! ndrxlogdump() failed to get context");
0781         }
0782     }
0783 out:
0784 
0785 #ifdef NDRX_OAPI_DEBUG
0786     NDRX_LOG(log_debug, "RETURN: ndrxlogdump() returns, context: %p, current: %p",
0787         *p_ctxt, G_atmi_tls);
0788 #endif
0789 
0790 
0791     return;
0792 }
0793 
0794 /**
0795  * Object-API wrapper for ndrxlog() - Auto generated.
0796  */
0797 expublic void Ondrxlog(TPCONTEXT_T *p_ctxt, int lev, char *message) 
0798 {
0799     int did_set = EXFALSE;
0800 
0801 
0802 #ifdef NDRX_OAPI_DEBUG
0803     NDRX_LOG(log_debug, "ENTRY: ndrxlog() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0804     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0805         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0806 
0807     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0808         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0809 
0810     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0811         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0812 
0813     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0814         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0815 
0816     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0817         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0818 
0819     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0820         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0821 
0822     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0823         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0824 #endif
0825 
0826  
0827 
0828  /* set the context */
0829     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0830     {
0831          /* set the context */
0832         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0833             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0834         {
0835             userlog("ERROR! ndrxlog() failed to set context");
0836         }
0837         did_set = EXTRUE;
0838     }
0839     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0840     {
0841         userlog("WARNING! ndrxlog() context %p thinks that it is assocated "
0842                 "with current thread, but thread is associated with %p context!",
0843                 p_ctxt, G_atmi_tls);
0844     }
0845 
0846     ndrxlog(lev, message);
0847 
0848     if (did_set)
0849     {
0850         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0851             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0852         {
0853             userlog("ERROR! ndrxlog() failed to get context");
0854         }
0855     }
0856 out:
0857 
0858 #ifdef NDRX_OAPI_DEBUG
0859     NDRX_LOG(log_debug, "RETURN: ndrxlog() returns, context: %p, current: %p",
0860         *p_ctxt, G_atmi_tls);
0861 #endif
0862 
0863 
0864     return;
0865 }
0866 
0867 /**
0868  * Object-API wrapper for ubflogdumpdiff() - Auto generated.
0869  */
0870 expublic void Oubflogdumpdiff(TPCONTEXT_T *p_ctxt, int lev, char *comment, void *ptr1, void *ptr2, int len) 
0871 {
0872     int did_set = EXFALSE;
0873 
0874 
0875 #ifdef NDRX_OAPI_DEBUG
0876     NDRX_LOG(log_debug, "ENTRY: ubflogdumpdiff() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0877     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0878         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0879 
0880     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0881         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0882 
0883     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0884         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0885 
0886     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0887         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0888 
0889     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0890         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0891 
0892     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0893         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0894 
0895     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0896         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0897 #endif
0898 
0899  
0900 
0901  /* set the context */
0902     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0903     {
0904          /* set the context */
0905         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0906             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0907         {
0908             userlog("ERROR! ubflogdumpdiff() failed to set context");
0909         }
0910         did_set = EXTRUE;
0911     }
0912     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0913     {
0914         userlog("WARNING! ubflogdumpdiff() context %p thinks that it is assocated "
0915                 "with current thread, but thread is associated with %p context!",
0916                 p_ctxt, G_atmi_tls);
0917     }
0918 
0919     ubflogdumpdiff(lev, comment, ptr1, ptr2, len);
0920 
0921     if (did_set)
0922     {
0923         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0924             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0925         {
0926             userlog("ERROR! ubflogdumpdiff() failed to get context");
0927         }
0928     }
0929 out:
0930 
0931 #ifdef NDRX_OAPI_DEBUG
0932     NDRX_LOG(log_debug, "RETURN: ubflogdumpdiff() returns, context: %p, current: %p",
0933         *p_ctxt, G_atmi_tls);
0934 #endif
0935 
0936 
0937     return;
0938 }
0939 
0940 /**
0941  * Object-API wrapper for ubflogdump() - Auto generated.
0942  */
0943 expublic void Oubflogdump(TPCONTEXT_T *p_ctxt, int lev, char *comment, void *ptr, int len) 
0944 {
0945     int did_set = EXFALSE;
0946 
0947 
0948 #ifdef NDRX_OAPI_DEBUG
0949     NDRX_LOG(log_debug, "ENTRY: ubflogdump() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
0950     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
0951         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
0952 
0953     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
0954         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
0955 
0956     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
0957         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
0958 
0959     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
0960         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
0961 
0962     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
0963         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
0964 
0965     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
0966         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
0967 
0968     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
0969         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
0970 #endif
0971 
0972  
0973 
0974  /* set the context */
0975     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
0976     {
0977          /* set the context */
0978         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
0979             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0980         {
0981             userlog("ERROR! ubflogdump() failed to set context");
0982         }
0983         did_set = EXTRUE;
0984     }
0985     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
0986     {
0987         userlog("WARNING! ubflogdump() context %p thinks that it is assocated "
0988                 "with current thread, but thread is associated with %p context!",
0989                 p_ctxt, G_atmi_tls);
0990     }
0991 
0992     ubflogdump(lev, comment, ptr, len);
0993 
0994     if (did_set)
0995     {
0996         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
0997             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
0998         {
0999             userlog("ERROR! ubflogdump() failed to get context");
1000         }
1001     }
1002 out:
1003 
1004 #ifdef NDRX_OAPI_DEBUG
1005     NDRX_LOG(log_debug, "RETURN: ubflogdump() returns, context: %p, current: %p",
1006         *p_ctxt, G_atmi_tls);
1007 #endif
1008 
1009 
1010     return;
1011 }
1012 
1013 /**
1014  * Object-API wrapper for ubflog() - Auto generated.
1015  */
1016 expublic void Oubflog(TPCONTEXT_T *p_ctxt, int lev, char *message) 
1017 {
1018     int did_set = EXFALSE;
1019 
1020 
1021 #ifdef NDRX_OAPI_DEBUG
1022     NDRX_LOG(log_debug, "ENTRY: ubflog() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
1023     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
1024         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
1025 
1026     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
1027         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
1028 
1029     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
1030         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
1031 
1032     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
1033         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
1034 
1035     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
1036         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
1037 
1038     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
1039         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
1040 
1041     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
1042         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
1043 #endif
1044 
1045  
1046 
1047  /* set the context */
1048     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
1049     {
1050          /* set the context */
1051         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
1052             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1053         {
1054             userlog("ERROR! ubflog() failed to set context");
1055         }
1056         did_set = EXTRUE;
1057     }
1058     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
1059     {
1060         userlog("WARNING! ubflog() context %p thinks that it is assocated "
1061                 "with current thread, but thread is associated with %p context!",
1062                 p_ctxt, G_atmi_tls);
1063     }
1064 
1065     ubflog(lev, message);
1066 
1067     if (did_set)
1068     {
1069         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
1070             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1071         {
1072             userlog("ERROR! ubflog() failed to get context");
1073         }
1074     }
1075 out:
1076 
1077 #ifdef NDRX_OAPI_DEBUG
1078     NDRX_LOG(log_debug, "RETURN: ubflog() returns, context: %p, current: %p",
1079         *p_ctxt, G_atmi_tls);
1080 #endif
1081 
1082 
1083     return;
1084 }
1085 
1086 
1087 /**
1088  * Object-API wrapper for tploggetreqfile() - Auto generated.
1089  */
1090 expublic int Otploggetreqfile(TPCONTEXT_T *p_ctxt, char *filename, int bufsize) 
1091 {
1092     int ret = EXSUCCEED;
1093     int did_set = EXFALSE;
1094 
1095 
1096 #ifdef NDRX_OAPI_DEBUG
1097     NDRX_LOG(log_debug, "ENTRY: tploggetreqfile() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
1098     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
1099         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
1100 
1101     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
1102         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
1103 
1104     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
1105         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
1106 
1107     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
1108         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
1109 
1110     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
1111         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
1112 
1113     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
1114         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
1115 
1116     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
1117         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
1118 #endif
1119 
1120  
1121 
1122     /* set the context */
1123     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
1124     {
1125         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0, 
1126             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1127         {
1128             userlog("ERROR! tploggetreqfile() failed to set context");
1129             EXFAIL_OUT(ret);
1130         }
1131         did_set = EXTRUE;
1132     }
1133     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
1134     {
1135         userlog("WARNING! tploggetreqfile() context %p thinks that it is assocated "
1136                 "with current thread, but thread is associated with %p context!",
1137                 p_ctxt, G_atmi_tls);
1138     }
1139     
1140     ret = tploggetreqfile(filename, bufsize);
1141 
1142     if (did_set)
1143     {
1144         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0, 
1145             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1146         {
1147             userlog("ERROR! tploggetreqfile() failed to get context");
1148             EXFAIL_OUT(ret);
1149         }
1150     }
1151 out:
1152 
1153 #ifdef NDRX_OAPI_DEBUG
1154     NDRX_LOG(log_debug, "RETURN: tploggetreqfile() returns, context: %p, current: %p",
1155         *p_ctxt, G_atmi_tls);
1156 #endif
1157 
1158  
1159     return ret; 
1160 }
1161 
1162 
1163 /**
1164  * Object-API wrapper for tplogconfig() - Auto generated.
1165  */
1166 expublic int Otplogconfig(TPCONTEXT_T *p_ctxt, int logger, int lev, char *debug_string, char *module, char *new_file) 
1167 {
1168     int ret = EXSUCCEED;
1169     int did_set = EXFALSE;
1170 
1171 
1172 #ifdef NDRX_OAPI_DEBUG
1173     NDRX_LOG(log_debug, "ENTRY: tplogconfig() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
1174     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
1175         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
1176 
1177     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
1178         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
1179 
1180     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
1181         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
1182 
1183     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
1184         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
1185 
1186     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
1187         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
1188 
1189     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
1190         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
1191 
1192     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
1193         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
1194 #endif
1195 
1196  
1197 
1198     /* set the context */
1199     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
1200     {
1201         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0, 
1202             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1203         {
1204             userlog("ERROR! tplogconfig() failed to set context");
1205             EXFAIL_OUT(ret);
1206         }
1207         did_set = EXTRUE;
1208     }
1209     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
1210     {
1211         userlog("WARNING! tplogconfig() context %p thinks that it is assocated "
1212                 "with current thread, but thread is associated with %p context!",
1213                 p_ctxt, G_atmi_tls);
1214     }
1215     
1216     ret = tplogconfig(logger, lev, debug_string, module, new_file);
1217 
1218     if (did_set)
1219     {
1220         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0, 
1221             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1222         {
1223             userlog("ERROR! tplogconfig() failed to get context");
1224             EXFAIL_OUT(ret);
1225         }
1226     }
1227 out:
1228 
1229 #ifdef NDRX_OAPI_DEBUG
1230     NDRX_LOG(log_debug, "RETURN: tplogconfig() returns, context: %p, current: %p",
1231         *p_ctxt, G_atmi_tls);
1232 #endif
1233 
1234  
1235     return ret; 
1236 }
1237 
1238 /**
1239  * Object-API wrapper for tplogclosereqfile() - Auto generated.
1240  */
1241 expublic void Otplogclosereqfile(TPCONTEXT_T *p_ctxt) 
1242 {
1243     int did_set = EXFALSE;
1244 
1245 
1246 #ifdef NDRX_OAPI_DEBUG
1247     NDRX_LOG(log_debug, "ENTRY: tplogclosereqfile() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
1248     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
1249         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
1250 
1251     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
1252         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
1253 
1254     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
1255         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
1256 
1257     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
1258         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
1259 
1260     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
1261         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
1262 
1263     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
1264         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
1265 
1266     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
1267         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
1268 #endif
1269 
1270  
1271 
1272  /* set the context */
1273     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
1274     {
1275          /* set the context */
1276         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
1277             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1278         {
1279             userlog("ERROR! tplogclosereqfile() failed to set context");
1280         }
1281         did_set = EXTRUE;
1282     }
1283     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
1284     {
1285         userlog("WARNING! tplogclosereqfile() context %p thinks that it is assocated "
1286                 "with current thread, but thread is associated with %p context!",
1287                 p_ctxt, G_atmi_tls);
1288     }
1289 
1290     tplogclosereqfile();
1291 
1292     if (did_set)
1293     {
1294         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
1295             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1296         {
1297             userlog("ERROR! tplogclosereqfile() failed to get context");
1298         }
1299     }
1300 out:
1301 
1302 #ifdef NDRX_OAPI_DEBUG
1303     NDRX_LOG(log_debug, "RETURN: tplogclosereqfile() returns, context: %p, current: %p",
1304         *p_ctxt, G_atmi_tls);
1305 #endif
1306 
1307 
1308     return;
1309 }
1310 
1311 /**
1312  * Object-API wrapper for tplogclosethread() - Auto generated.
1313  */
1314 expublic void Otplogclosethread(TPCONTEXT_T *p_ctxt) 
1315 {
1316     int did_set = EXFALSE;
1317 
1318 
1319 #ifdef NDRX_OAPI_DEBUG
1320     NDRX_LOG(log_debug, "ENTRY: tplogclosethread() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
1321     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
1322         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
1323 
1324     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
1325         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
1326 
1327     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
1328         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
1329 
1330     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
1331         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
1332 
1333     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
1334         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
1335 
1336     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
1337         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
1338 
1339     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
1340         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
1341 #endif
1342 
1343  
1344 
1345  /* set the context */
1346     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
1347     {
1348          /* set the context */
1349         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
1350             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1351         {
1352             userlog("ERROR! tplogclosethread() failed to set context");
1353         }
1354         did_set = EXTRUE;
1355     }
1356     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
1357     {
1358         userlog("WARNING! tplogclosethread() context %p thinks that it is assocated "
1359                 "with current thread, but thread is associated with %p context!",
1360                 p_ctxt, G_atmi_tls);
1361     }
1362 
1363     tplogclosethread();
1364 
1365     if (did_set)
1366     {
1367         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
1368             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1369         {
1370             userlog("ERROR! tplogclosethread() failed to get context");
1371         }
1372     }
1373 out:
1374 
1375 #ifdef NDRX_OAPI_DEBUG
1376     NDRX_LOG(log_debug, "RETURN: tplogclosethread() returns, context: %p, current: %p",
1377         *p_ctxt, G_atmi_tls);
1378 #endif
1379 
1380 
1381     return;
1382 }
1383 
1384 /**
1385  * Object-API wrapper for tplogsetreqfile_direct() - Auto generated.
1386  */
1387 expublic void Otplogsetreqfile_direct(TPCONTEXT_T *p_ctxt, char *filename) 
1388 {
1389     int did_set = EXFALSE;
1390 
1391 
1392 #ifdef NDRX_OAPI_DEBUG
1393     NDRX_LOG(log_debug, "ENTRY: tplogsetreqfile_direct() enter, context: %p, current: %p", *p_ctxt, G_atmi_tls);
1394     NDRX_LOG(log_debug, "ENTRY: is_associated_with_thread = %d", 
1395         ((atmi_tls_t *)*p_ctxt)->is_associated_with_thread);
1396 
1397     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NSTD = %d", 
1398         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NSTD );
1399 
1400     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_UBF = %d", 
1401         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_UBF );
1402 
1403     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_ATMI = %d", 
1404         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_ATMI );
1405 
1406     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_TRAN = %d", 
1407         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_TRAN );
1408 
1409     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_NOCHK = %d", 
1410         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_NOCHK );
1411 
1412     NDRX_LOG(log_debug, "ENTRY: CTXT_PRIV_IGN = %d", 
1413         (CTXT_PRIV_NSTD | CTXT_PRIV_IGN) & CTXT_PRIV_IGN );
1414 #endif
1415 
1416  
1417 
1418  /* set the context */
1419     if (!((atmi_tls_t *)*p_ctxt)->is_associated_with_thread)
1420     {
1421          /* set the context */
1422         if (EXSUCCEED!=ndrx_tpsetctxt(*p_ctxt, 0,
1423             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1424         {
1425             userlog("ERROR! tplogsetreqfile_direct() failed to set context");
1426         }
1427         did_set = EXTRUE;
1428     }
1429     else if ((atmi_tls_t *)*p_ctxt != G_atmi_tls)
1430     {
1431         userlog("WARNING! tplogsetreqfile_direct() context %p thinks that it is assocated "
1432                 "with current thread, but thread is associated with %p context!",
1433                 p_ctxt, G_atmi_tls);
1434     }
1435 
1436     tplogsetreqfile_direct(filename);
1437 
1438     if (did_set)
1439     {
1440         if (TPMULTICONTEXTS!=ndrx_tpgetctxt(p_ctxt, 0,
1441             CTXT_PRIV_NSTD | CTXT_PRIV_IGN))
1442         {
1443             userlog("ERROR! tplogsetreqfile_direct() failed to get context");
1444         }
1445     }
1446 out:
1447 
1448 #ifdef NDRX_OAPI_DEBUG
1449     NDRX_LOG(log_debug, "RETURN: tplogsetreqfile_direct() returns, context: %p, current: %p",
1450         *p_ctxt, G_atmi_tls);
1451 #endif
1452 
1453 
1454     return;
1455 }
1456 
1457