From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6319 invoked by alias); 18 May 2015 09:42:57 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6296 invoked by uid 89); 18 May 2015 09:42:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f173.google.com Received: from mail-ie0-f173.google.com (HELO mail-ie0-f173.google.com) (209.85.223.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 18 May 2015 09:42:55 +0000 Received: by iebgx4 with SMTP id gx4so165995672ieb.0 for ; Mon, 18 May 2015 02:42:53 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.9.223 with SMTP id 92mr2489253ioj.71.1431942173879; Mon, 18 May 2015 02:42:53 -0700 (PDT) Received: by 10.36.32.139 with HTTP; Mon, 18 May 2015 02:42:53 -0700 (PDT) Date: Mon, 18 May 2015 12:34:00 -0000 Message-ID: Subject: File operations on a Windows Driver (character device) From: Alessio Faina To: "cygwin@cygwin.com" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00213.txt.bz2 Hello everyone, I'm developing a port of a FreeBSD/Linux application that consists of two parts: a kernel and a user land part. The kernel part is build as a WDM driver and is compiled with VS2013 and WDK 8.1: the userspace is going to be compiled under Cygwin for compatibility with user land programs already written for other OSs. My problem is that the user space program invokes Open(), ioctl(), mmap/munmap(), select() and poll(). I've build a test Win32 app to open with CreateFile the DosDevice with the "\\\\.\\uniioctl" name and everything goes fine, but I've tried to do the same thing with Open(...) with a lot of variants (\\DosDevice\\uniioctl, \dev\uniioctl....) but I'm unable to open the character device. There is some way to do this? For the second main problem, I need to do an mmap/munmap; I was thinking to emulate this mechanism with an IOCTL in the kernel module but doing so, I wouldn't be able to use the mmap provided by Cygwin if I've understood how the things are working; so I'm wondering how to cope with this problem; there's some way to explicitly tell Cygwin where to find the memory that needs to be allocated in userspace? How can I do this in the kernel module? Thanks everyone, -Alessio -- 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