AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
threadpool.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_UNO_THREADPOOL_H
5 #define INCLUDED_UNO_THREADPOOL_H
6 
7 #include "cppu/cppudllapi.h"
8 #include "sal/types.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /***
15  * Thread identifier administration.
16  ***/
33 
34 
45 CPPU_DLLPUBLIC void SAL_CALL uno_getIdOfCurrentThread( sal_Sequence **ppThreadId )
47 
48 
55 
56 
57 struct _uno_ThreadPool;
58 typedef struct _uno_ThreadPool * uno_ThreadPool;
59 
64 CPPU_DLLPUBLIC uno_ThreadPool SAL_CALL
66 
67 
79 CPPU_DLLPUBLIC void SAL_CALL
80 uno_threadpool_attach( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C();
81 
91 CPPU_DLLPUBLIC void SAL_CALL
92 uno_threadpool_enter( uno_ThreadPool hPool , void **ppJob )
93  SAL_THROW_EXTERN_C();
94 
100 CPPU_DLLPUBLIC void SAL_CALL
101 uno_threadpool_detach( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C();
102 
133 CPPU_DLLPUBLIC void SAL_CALL
135  uno_ThreadPool hPool,
136  sal_Sequence *pThreadId,
137  void *pJob,
138  void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ),
139  sal_Bool bIsOneway ) SAL_THROW_EXTERN_C();
140 
152 CPPU_DLLPUBLIC void SAL_CALL
153 uno_threadpool_dispose( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C();
154 
155 
165 CPPU_DLLPUBLIC void SAL_CALL
166 uno_threadpool_destroy( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C();
167 
168 #ifdef __cplusplus
169 }
170 #endif
171 
172 #endif // INCLUDED_UNO_THREADPOOL_H
173 
174 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned char sal_Bool
Definition: types.h:18
CPPU_DLLPUBLIC void uno_threadpool_detach(uno_ThreadPool hPool) SAL_THROW_EXTERN_C()
Detaches the current thread from the threadpool.
CPPU_DLLPUBLIC void uno_threadpool_dispose(uno_ThreadPool hPool) SAL_THROW_EXTERN_C()
All threads, that are waiting on the hPool handle, are forced out of the pool.
CPPU_DLLPUBLIC void SAL_THROW_EXTERN_C()
This method is called to wait for a reply of a previously sent request.
CPPU_DLLPUBLIC void uno_threadpool_destroy(uno_ThreadPool hPool) SAL_THROW_EXTERN_C()
Releases the previously with uno_threadpool_create() created handle.
CPPU_DLLPUBLIC void uno_getIdOfCurrentThread(sal_Sequence **ppThreadId) SAL_THROW_EXTERN_C()
Get the identifier of the current thread.
This is the binary specification of a SAL sequence.
Definition: types.h:283
CPPU_DLLPUBLIC void uno_threadpool_putJob(uno_ThreadPool hPool, sal_Sequence *pThreadId, void *pJob, void(*doRequest)(void *pThreadSpecificData), sal_Bool bIsOneway) SAL_THROW_EXTERN_C()
Puts a job into the pool.
CPPU_DLLPUBLIC sal_Bool uno_bindIdToCurrentThread(sal_Sequence *pThreadId) SAL_THROW_EXTERN_C()
Establishes an association between the current thread and the given thread identifier.
CPPU_DLLPUBLIC void uno_threadpool_attach(uno_ThreadPool hPool) SAL_THROW_EXTERN_C()
Makes the current thread known to the threadpool.
CPPU_DLLPUBLIC uno_ThreadPool uno_threadpool_create() SAL_THROW_EXTERN_C()
Creates a threadpool handle.
CPPU_DLLPUBLIC void uno_releaseIdFromCurrentThread() SAL_THROW_EXTERN_C()
If the internal refcount drops to zero, the association between threadId and thread is broken...
#define CPPU_DLLPUBLIC
Definition: cppudllapi.h:11
struct _uno_ThreadPool * uno_ThreadPool
Definition: threadpool.h:58