Date: Thu, 30 Aug 2001 12:19:50 -0700 (PDT) From: Rob Phillips <rob@netrake.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/30223: Using /usr/share/examples/kld/cdev, testcdev fails when compiled w/ -pthread Message-ID: <200108301919.f7UJJou35676@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 30223 >Category: kern >Synopsis: Using /usr/share/examples/kld/cdev, testcdev fails when compiled w/ -pthread >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 30 12:30:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Rob Phillips >Release: 4.3-STABLE >Organization: Netrake Corporation >Environment: FreeBSD nrclient-136 4.3-RELEASE FreeBSD 4.3-RELEASE #0: sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386 >Description: I'm working on writing a KLD device driver that interacts with some pthread-ed code, and I'm running into problems. To make sure it wasn't my code, I took the example code from /usr/share/examples/kld/cdev and compiled it as-is. This worked fine. However, when I added the line: COPTS= -pthread to the Makefile for the testcdev code, it stops working. The device driver records a seeminingly infinite loop of write() calls, rather than the single write call you normally get. It also records an unknown (to me) ioctl that isn't there when you don't use threads. Is this an error with the threads, the device driver, or something else? >How-To-Repeat: Change /usr/share/examples/kld/cdev/test/Makefile to include: COPTS= -pthread It is not necessary to do any changes to the C file. Recompile and then run the testcdev program (after loading the cdev driver). >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108301919.f7UJJou35676>