Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
lxrc.h File Reference
#include <TargConfig.h>
#include <balua.h>
#include <SoDispCon.h>
Include dependency graph for lxrc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LThreadMgr
 Run native jobs and protected Lua callbacks on BAS worker threads. More...
 
struct  ThreadJob
 An owned unit of work created by ThreadJob_create or ThreadJob_lcreate. More...
 

Macros

#define LThreadMgr_canRun(o)   ! DoubleList_isEmpty(&(o)->idleThreadList)
 This function returns true if at least one thread is currently idle and there is no need to queue the job when calling LThreadMgr_run. More...
 
#define LThreadMgr_enableHttpPool(o, server)    HttpServer_setThreadPoolIntf(server, (HttpCmdThreadPoolIntf*)o)
 LThreadMgr can be used as a Thread Pool and is often utilized in real-time operating system (RTOS) devices with limited resources as a substitute for HttpCmdThreadPool. More...
 

Typedefs

typedef void(* ThreadJob_Run) (struct ThreadJob *tj, struct LThreadMgr *mgr)
 Generic ThreadJob callback. More...
 
typedef void(* ThreadJob_LRun) (struct ThreadJob *tj, int msgh, struct LThreadMgr *mgr)
 ThreadJob callback designed for calling Lua code using lua_pcall. More...
 
typedef struct LThreadMgr LThreadMgr
 Run native jobs and protected Lua callbacks on BAS worker threads. More...
 
typedef struct ThreadJob ThreadJob
 An owned unit of work created by ThreadJob_create or ThreadJob_lcreate. More...
 

Functions

BA_API void balua_forkpty (lua_State *L)
 Install the forkpty Lua bindings. More...
 
BA_API void balua_http (lua_State *L)
 Install the httpc Lua bindings. More...
 
BA_API void balua_luaio (lua_State *L)
 Install the LuaIo Lua bindings. More...
 
BA_API void balua_sharkssl (lua_State *L)
 Install the SharkSSL Lua bindings. More...
 
BA_API void balua_socket (lua_State *L)
 Install the socket Lua bindings. More...
 
BA_API void balua_relsocket (lua_State *L)
 Notify registered coroutine sockets that the server is shutting down. More...
 
BA_API void balua_crypto (lua_State *L)
 Install the crypto Lua bindings. More...
 
BA_API void balua_tracelogger (lua_State *L, struct LThreadMgr *tmgr)
 Install the TraceLogger Lua bindings. More...
 
BA_API void LThreadMgr_destructor (LThreadMgr *o)
 This function terminates the Thread Pool and waits for all threads to stop before returning. More...
 
BA_API void LThreadMgr_constructor (LThreadMgr *o, HttpServer *server, ThreadPriority priority, int stackSize, int threads, lua_State *L, int allowCreate)
 Initialize the thread pool and install ba.thread. More...
 
BA_API ThreadJob * ThreadJob_create (size_t size, ThreadJob_Run run)
 Create a generic thread job. More...
 
BA_API ThreadJob * ThreadJob_lcreate (size_t size, ThreadJob_LRun lrun)
 Create a thread job designed to execute Lua code. More...
 
BA_API int LThreadMgr_run (LThreadMgr *o, ThreadJob *tj)
 This function sends a thread job to an available idle thread, or queues the job if no threads are currently available. More...