pthread_mutex_init(&mutex, NULL);
- pthread_t thread1, thread2;
+ pthread_t thread1;
+ pthread_t thread2;
pthread_create(&thread1, NULL, thread1_fun, NULL);
fprintf(stderr, "here\n");
pthread_create(&thread2, NULL, thread2_fun, NULL);
{
sthread_mutex_init(&mutex, NULL);
- sthread_t thread1, thread2;
+ sthread_t thread1;
+ sthread_t thread2;
sthread_create(&thread1, NULL, thread1_fun, NULL);
sthread_create(&thread2, NULL, thread2_fun, NULL);
// pthread_join(thread1, NULL);
XBT_LOG_NEW_DEFAULT_CATEGORY(sthread, "pthread intercepter");
namespace sg4 = simgrid::s4u;
-static sg4::Host* lilibeth = NULL;
+static sg4::Host* lilibeth = nullptr;
int sthread_main(int argc, char** argv, char** envp, int (*raw_main)(int, char**, char**))
{
sthread_disable();
}
-int sthread_create(unsigned long int* thread, const /*pthread_attr_t*/ void* attr, void* (*start_routine)(void*),
+int sthread_create(unsigned long int* thread, const void* /*pthread_attr_t* attr*/, void* (*start_routine)(void*),
void* arg)
{
static int TID = 0;
*thread = reinterpret_cast<unsigned long>(actor.get());
return 0;
}
-int sthread_join(sthread_t thread, void** retval)
+int sthread_join(sthread_t thread, void** /*retval*/)
{
sg4::ActorPtr actor(reinterpret_cast<sg4::Actor*>(thread));
actor->join();
return 0;
}
-int sthread_mutex_init(sthread_mutex_t* mutex, const /*pthread_mutexattr_t*/ void* attr)
+int sthread_mutex_init(sthread_mutex_t* mutex, const void* /*pthread_mutexattr_t* attr*/)
{
auto m = sg4::Mutex::create();
intrusive_ptr_add_ref(m.get());
*/
static void xbt_preinit() XBT_ATTRIB_CONSTRUCTOR(200);
static void xbt_postexit();
-void sthread_enable() {} // These symbols are used from ContextSwapped in any case, but they are only useful
-void sthread_disable() {} // when libsthread is LD_PRELOADED. In this case, sthread's implem gets used instead.
+void sthread_enable()
+{ // These symbols are used from ContextSwapped in any case, but they are only useful
+}
+void sthread_disable()
+{ // when libsthread is LD_PRELOADED. In this case, sthread's implem gets used instead.
+}
#ifdef _WIN32
#include <windows.h>
{
return false;
}
-#endif
\ No newline at end of file
+#endif
e.load_platform(platform_file);
simgrid::s4u::Actor::create("actor", e.host_by_name("c1_0"), runner);
e.run();
- }
- catch (simgrid::AssertionError& e) {
+ } catch (const simgrid::AssertionError& e) {
std::cout << e.what() << "\n";
}