Re: Anamoly with ioctl() in cygwin 1.7.10

2012-03-09 Thread Lee Collier
The problem is resolved in the snapshot as well. Thanks again. LC -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Re: Anamoly with ioctl() in cygwin 1.7.10

2012-03-08 Thread Lee Collier
Corinna Vinschen cygwin.com> writes: > > On Mar 8 11:33, Corinna Vinschen wrote: > > You're trying this on a 64 bit machine, right? Call `peflags -l0' on > > your executable and try again. It should work. > > > Well, I think I have a solution now. I applied a patch to CVS and > I'm just ge

Re: Anamoly with ioctl() in cygwin 1.7.10

2012-03-08 Thread Corinna Vinschen
On Mar 8 11:33, Corinna Vinschen wrote: > On Mar 8 01:35, Lee Collier wrote: > > Jon Clugston gmail.com> writes: > > > > > > Don't know if it will fix your problem, but you cannot just create a > > > mutex on the stack and call "lock" on it. You must initialize it with > > > "pthread_mutex_ini

Re: Anamoly with ioctl() in cygwin 1.7.10

2012-03-08 Thread Corinna Vinschen
On Mar 8 01:35, Lee Collier wrote: > Jon Clugston gmail.com> writes: > > > > Don't know if it will fix your problem, but you cannot just create a > > mutex on the stack and call "lock" on it. You must initialize it with > > "pthread_mutex_init()". > > > > Jon > > > > > Good catch. I missed t

Re: Anamoly with ioctl() in cygwin 1.7.10

2012-03-07 Thread Lee Collier
Jon Clugston gmail.com> writes: > > Don't know if it will fix your problem, but you cannot just create a > mutex on the stack and call "lock" on it. You must initialize it with > "pthread_mutex_init()". > > Jon > > Good catch. I missed that in my haste to scrounge a sample pgm together. With

Re: Anamoly with ioctl() in cygwin 1.7.10

2012-03-07 Thread Jon Clugston
On Wed, Mar 7, 2012 at 1:51 PM, Lee Collier wrote: > Hello, > > I'm new to cygwin and ran into an anamoly with calling ioctl() that > I've not experienced on Linux. It appears that ioctl() behaves as > expected when it is called from the main thread; however, it does not > when called from a thread

Anamoly with ioctl() in cygwin 1.7.10

2012-03-07 Thread Lee Collier
Hello, I'm new to cygwin and ran into an anamoly with calling ioctl() that I've not experienced on Linux. It appears that ioctl() behaves as expected when it is called from the main thread; however, it does not when called from a thread created by the main thread. Is this expected behavior when us

RE: ioctl in cygwin

2008-08-19 Thread Chen, Lihong
PROTECTED] Sent: Tuesday, August 19, 2008 10:14 AM To: cygwin@cygwin.com Subject: Re: ioctl in cygwin On Tue, Aug 19, 2008 at 09:27:59AM -0500, Chen, Lihong wrote: >Hi, >I need to be able to open a device using the POSIX reference in Cygwin >and issue IOCTL calls to it. SCSI commands spe

Re: ioctl in cygwin

2008-08-19 Thread Christopher Faylor
On Tue, Aug 19, 2008 at 09:27:59AM -0500, Chen, Lihong wrote: >Hi, >I need to be able to open a device using the POSIX reference in Cygwin >and issue IOCTL calls to it. SCSI commands specifically. > >The following is some code: > >struct sg_io_hdr io_hdr; > > int fd = open("/dev/sdc", O_RDWR);

ioctl in cygwin

2008-08-19 Thread Chen, Lihong
Hi, I need to be able to open a device using the POSIX reference in Cygwin and issue IOCTL calls to it. SCSI commands specifically. The following is some code: struct sg_io_hdr io_hdr; int fd = open("/dev/sdc", O_RDWR); ret = ioctl(fd, SG_IO, &io_hdr); I put in my own sg_io_hdr in t