NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51884: [PATCH] tests/lib/libpthread/t_condwait: various fixes



The following reply was made to PR bin/51884; it has been noted by GNATS.

From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51884: [PATCH] tests/lib/libpthread/t_condwait: various fixes
Date: Sun, 15 Jan 2017 13:02:11 -0800

 --Apple-Mail=_1C964623-BF34-482D-B7FC-87A57DD1A95F
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 Patch attached.
 -Ngie
 
 --Apple-Mail=_1C964623-BF34-482D-B7FC-87A57DD1A95F
 Content-Disposition: attachment;
 	filename=t_condwait-various-fixes.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_condwait-various-fixes.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: lib/libpthread/t_condwait.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libpthread/t_condwait.c,v
 retrieving revision 1.4
 diff -u -r1.4 t_condwait.c
 --- lib/libpthread/t_condwait.c	12 Apr 2013 17:18:11 -0000	1.4
 +++ lib/libpthread/t_condwait.c	15 Jan 2017 20:37:55 -0000
 @@ -28,6 +28,7 @@
  #include <sys/cdefs.h>
  __RCSID("$NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $");
  
 +#include <sys/time.h>
  #include <errno.h>
  #include <pthread.h>
  #include <stdio.h>
 @@ -40,6 +41,8 @@
  
  #include "isqemu.h"
  
 +#include "h_common.h"
 +
  #define WAITTIME 2	/* Timeout wait secound */
  
  static const int debug = 1;
 @@ -56,8 +59,8 @@
  
  
  	clck = *(clockid_t *)param;
 -	pthread_condattr_init(&attr);
 -	pthread_condattr_setclock(&attr, clck); /* MONOTONIC or MONOTONIC */
 +	PTHREAD_REQUIRE(pthread_condattr_init(&attr));
 +	PTHREAD_REQUIRE(pthread_condattr_setclock(&attr, clck));
  	pthread_cond_init(&cond, &attr);
  
  	ATF_REQUIRE_EQ((ret = pthread_mutex_lock(&m)), 0);
 
 --Apple-Mail=_1C964623-BF34-482D-B7FC-87A57DD1A95F--
 


Home | Main Index | Thread Index | Old Index