SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
43
benchmarks/sysbench/patches/patch-sysbench_sb_logger_c
Normal file
43
benchmarks/sysbench/patches/patch-sysbench_sb_logger_c
Normal file
|
@ -0,0 +1,43 @@
|
|||
--- sysbench/sb_logger.c.orig Mon Apr 3 12:39:09 2006
|
||||
+++ sysbench/sb_logger.c Tue Apr 15 12:10:58 2008
|
||||
@@ -441,15 +441,17 @@ int oper_handler_init(void)
|
||||
|
||||
if (batch_mode)
|
||||
{
|
||||
+ int err;
|
||||
pthread_mutex_init(&batch_mutex, NULL);
|
||||
pthread_cond_init(&batch_cond, NULL);
|
||||
|
||||
/* Create batch thread */
|
||||
pthread_attr_init(&batch_attr);
|
||||
- if (pthread_create(&batch_thread, &batch_attr, &batch_runner_proc, NULL)
|
||||
- != 0)
|
||||
+ if ((err = pthread_create(&batch_thread, &batch_attr,
|
||||
+ &batch_runner_proc, NULL)) != 0)
|
||||
{
|
||||
- log_errno(LOG_FATAL, "Batch thread creation failed");
|
||||
+ log_text(LOG_FATAL, "Batch thread creation failed errno = %d (%s)",
|
||||
+ err, strerror(err));
|
||||
return 1;
|
||||
}
|
||||
batch_status = BATCH_STATUS_STOP;
|
||||
@@ -541,15 +543,17 @@ int oper_handler_done(void)
|
||||
|
||||
if (batch_mode)
|
||||
{
|
||||
+ int err;
|
||||
/* Stop the batch thread */
|
||||
pthread_mutex_lock(&batch_mutex);
|
||||
batch_status = BATCH_STATUS_STOP;
|
||||
pthread_cond_signal(&batch_cond);
|
||||
pthread_mutex_unlock(&batch_mutex);
|
||||
|
||||
- if (pthread_join(batch_thread, NULL))
|
||||
+ if ((err = pthread_join(batch_thread, NULL)))
|
||||
{
|
||||
- log_errno(LOG_FATAL, "Batch thread join failed");
|
||||
+ log_text(LOG_FATAL, "Batch thread join failed errno = %d (%s)",
|
||||
+ err, strerror(err));
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue