delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/18/05:43:16

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=mUNfJdr9/jvMyPkr571YJfS3NNrRn
ebJbIMBBplA/3GOIgg45hHetTw2XVca4qdQ1ZPMdKyAPWPeG5h5ErJHJtyUbg+gV
EpE/WmRbwcIPXf3l2uuk7LogEuBFlWN1xQ+1bllK5gX2x0Tx08uTJ99lXFYFp5zD
fp8YVIuLTc7y0A=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=3grTp4B+cnoPQsTfQOazOEnUz1w=; b=f59
dZ1Ouxiwwr/JpqCGOIWbJ/+j3pBmDG6JM2DU9m2Er+GhLNJ9Ta88HJXP+AmuvXRh
8Z6zO2nAMr7lPOzyU11JWOMcvE0Yvt2QvqSVqcvbt6IWUyhvVFXL73fLYFnElPGW
hAVZmH02Lr38tDh5Nrd50s1B3boVbGouJist1ymQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
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)
Date: Mon, 18 May 2015 11:42:53 +0200
Message-ID: <CACs=mWDRGh9KZBT45=8yy4J6h62v0RNYxczV91qRhhb8LcfY4Q@mail.gmail.com>
Subject: File operations on a Windows Driver (character device)
From: Alessio Faina <alessiofaina AT gmail DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019