SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,43 @@
--- sysbench/sysbench.c.orig Tue Jan 31 11:15:53 2006
+++ sysbench/sysbench.c Tue Apr 15 12:10:58 2008
@@ -423,12 +423,14 @@ int run_test(sb_test_t *test)
/* Starting the test threads */
for(i = 0; i < sb_globals.num_threads; i++)
{
+ int err;
if (sb_globals.error)
return 1;
- if (pthread_create(&(threads[i].thread), &thread_attr, &runner_thread,
- (void*)&(threads[i])) != 0)
+ if ((err = pthread_create(&(threads[i].thread), &thread_attr,
+ &runner_thread, (void*)&(threads[i]))) != 0)
{
- log_errno(LOG_FATAL, "Thread #%d creation failed", i);
+ log_text(LOG_FATAL, "Thread #%d creation failed errno = %d (%s)",
+ i, err, strerror(err));
return 1;
}
}
@@ -437,9 +439,11 @@ int run_test(sb_test_t *test)
log_text(LOG_INFO, "Threads started!");
for(i = 0; i < sb_globals.num_threads; i++)
{
- if(pthread_join(threads[i].thread, NULL))
+ int err;
+ if((err = pthread_join(threads[i].thread, NULL)))
{
- log_errno(LOG_FATAL, "Thread #%d join failed", i);
+ log_text(LOG_FATAL, "Thread #%d join failed errno = %d (%s)",
+ i, err, strerror(err));
return 1;
}
}
@@ -508,7 +512,7 @@ int init(void)
return 1;
}
- thread_stack_size = sb_get_value_int("thread-stack-size");
+ thread_stack_size = sb_get_value_size("thread-stack-size");
if (thread_stack_size <= 0)
{
log_text(LOG_FATAL, "Invalid value for thread-stack-size: %d.\n", thread_stack_size);