SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
thread.h
Go to the documentation of this file.
1 
8 #ifndef __SOLAR_CAPTURE_THREAD_H__
9 #define __SOLAR_CAPTURE_THREAD_H__
10 
11 
12 struct sc_thread;
13 struct sc_session;
14 
15 
30 extern int sc_thread_alloc(struct sc_thread** thread_out,
31  const struct sc_attr* attr,
32  struct sc_session* scs);
33 
37 extern struct sc_session*
38  sc_thread_get_session(const struct sc_thread* thread);
39 
40 #if SC_API_VER >= 1
41 
51 extern void sc_thread_get_time(const struct sc_thread* thread,
52  struct timespec* time_out);
53 #endif
54 
55 #if SC_API_VER >= 1
56 
69 extern void* sc_thread_calloc(struct sc_thread* thread, size_t bytes);
70 #endif
71 
72 #if SC_API_VER >= 1
73 
87 extern void* sc_thread_calloc_aligned(struct sc_thread* thread,
88  size_t bytes, int align);
89 #endif
90 
91 #if SC_API_VER >= 1
92 
101 extern void sc_thread_mfree(struct sc_thread* thread, void* mem);
102 #endif
103 
104 #if SC_API_VER >= 2
105 
121 extern int sc_thread_poll(struct sc_thread* thread);
122 #endif
123 
124 
125 #endif /* __SOLAR_CAPTURE_THREAD_H__ */
126 
Attribute object.
struct sc_session * sc_thread_get_session(const struct sc_thread *thread)
Return the session associated with a thread.
void * sc_thread_calloc_aligned(struct sc_thread *thread, size_t bytes, int align)
Allocate memory to be used by a thread.
void sc_thread_get_time(const struct sc_thread *thread, struct timespec *time_out)
Return a thread's "current time".
void sc_thread_mfree(struct sc_thread *thread, void *mem)
Free memory.
int sc_thread_alloc(struct sc_thread **thread_out, const struct sc_attr *attr, struct sc_session *scs)
Allocate a SolarCapture thread.
void * sc_thread_calloc(struct sc_thread *thread, size_t bytes)
Allocate memory to be used by a thread.
int sc_thread_poll(struct sc_thread *thread)
Poll a thread.