Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00021 #ifndef MESH_SYSCALLS_H
00022 #define MESH_SYSCALLS_H
00023
00071 void mesh_consume_str(const gchar *str,...);
00072
00086 void mesh_consume_str_no_sched(const gchar *str,...);
00087
00101 void mesh_consume_str_and_exit(const gchar *format, ...);
00102
00117 void mesh_sched_consume_str(mesh_resource *cr, const gchar *str,...);
00118
00119
00120 void mesh_consume_delay(mesh_resource *cr, mesh_time delay);
00121
00137 void mesh_lightweight_consume_str(const gchar *str,...);
00138
00139
00140 void mesh_sched_consume(mesh_resource *cr, double cost);
00141
00142
00143 double mesh_get_default_resource_power(mesh_resource *cr);
00144
00145
00146
00147
00148 void mesh_lightweight_consume(double cost, int no_mem_pairs, ...);
00149
00160 void mesh_consume(double cost, int no_mem_pairs, ...);
00161
00162
00163
00164
00165 void mesh_lightweight_commit();
00166
00167
00168
00169
00170 void mesh_lightweight_commit_no_sched();
00171
00172
00173
00174
00175 void mesh_lightweight_commit_group();
00176
00177
00178
00179
00180
00181
00182 void mesh_lightweight_autocommit(int threshold);
00183
00191 void mesh_yield();
00192
00193
00194 mesh_consume_data *parse_consume_string(gchar *str);
00195
00196
00197
00198
00199
00200 void mesh_thread_setspecific(void *data);
00201 void * mesh_thread_getspecific();
00202
00214 void mesh_thread_create_entry(mesh_thread *cr, gchar *key, void *value);
00224 gboolean mesh_thread_has_entry(mesh_thread *cr, gchar *key, void **value);
00235 void *mesh_thread_get_entry(mesh_thread *cr, gchar *key);
00246 void mesh_thread_set_entry(mesh_thread *cr, gchar *key, void *value);
00247
00259 void mesh_resource_create_entry(mesh_resource *cr, gchar *key, void *value);
00270 void *mesh_resource_get_entry(mesh_resource *cr, gchar *key);
00281 void mesh_resource_set_entry(mesh_resource *cr, gchar *key, void *value);
00282
00294 void mesh_scheduler_create_entry(mesh_scheduler *cs, gchar *key, void *value);
00295
00306 void *mesh_scheduler_get_entry(mesh_scheduler *cs, gchar *key);
00307
00318 void mesh_scheduler_set_entry(mesh_scheduler *cs, gchar *key, void *value);
00319
00325 void mesh_thread_inc_counter(double);
00326
00334 double mesh_thread_get_and_clear_counter();
00335
00336
00337
00338
00339
00340
00341
00342
00343
00354 gint mesh_thread_sem_init ( mesh_thread_sem *sem, gint pshared,
00355 unsigned int value );
00364 gint mesh_thread_sem_wait ( mesh_thread_sem *sem );
00375 gint mesh_thread_sem_trywait ( mesh_thread_sem *sem );
00376
00384 gint mesh_thread_sem_post ( mesh_thread_sem *sem );
00385
00386 gint mesh_thread_sem_getvalue ( mesh_thread_sem *sem, int *sval );
00387 gint mesh_thread_sem_destroy ( mesh_thread_sem *sem );
00388
00401 gint mesh_thread_sem_post_delayed ( mesh_thread_sem *sem );
00402
00411 gint mesh_thread_mutex_init(mesh_thread_mutex *mutex, void *attr);
00412
00422 gint mesh_thread_mutex_lock(mesh_thread_mutex *mutex);
00423
00432 gint mesh_thread_mutex_unlock(mesh_thread_mutex *mutex);
00433
00443 gint mesh_thread_mutex_unlock_delayed(mesh_thread_mutex *mutex);
00444
00454 gint mesh_thread_mutex_destroy(mesh_thread_mutex *mutex);
00455
00465 gint mesh_thread_mutex_trylock(mesh_thread_mutex *mutex);
00466
00467
00468 gint mesh_thread_cond_init(mesh_thread_cond *cond, void *attr);
00469 gint mesh_thread_cond_signal(mesh_thread_cond *cond);
00470 gint mesh_thread_cond_broadcast(mesh_thread_cond *cond);
00471 gint mesh_thread_cond_signal_delayed(mesh_thread_cond *cond);
00472 gint mesh_thread_cond_broadcast_delayed(mesh_thread_cond *cond);
00473 gint mesh_thread_cond_wait(mesh_thread_cond *cond, mesh_thread_mutex *mutex);
00474 gint mesh_thread_cond_timedwait(mesh_thread_cond *cond, mesh_thread_mutex *mutex,
00475 const struct timespec *abstime);
00476 gint mesh_thread_cond_destroy(mesh_thread_cond *cond);
00477
00478
00479 gint mesh_thread_join(mesh_thread *ct, void **retval);
00480
00481
00482 void mesh_free_delayed(void *arg);
00483
00484
00485 void *mesh_memcpy_delayed(void *dest, const void *src, size_t n);
00486
00487
00488 void mesh_exit();
00489
00490
00491
00492 void mesh_untimed_wait_for(mesh_time time);
00493
00494
00495
00496
00497 void return_control_to_kernel(mesh_thread *ct,
00498 mesh_scheduling_policy policy);
00499
00500 #endif