From: isnkrnl@attglobal.net
To: linux-kernel@vger.kernel.org
Subject: Bizarre multithread open/close problem
Date: Mon, 30 Jul 2001 21:09:29 +0000 (CUT) [thread overview]
Message-ID: <3B65CD09.000001.33392@be1.prserv.net> (raw)
[-- Attachment #1: Type: Text/plain, Size: 1211 bytes --]
I'm not sure if this is a bug or not but my
coworker has a wierd one.
He has 2 threads, main and helper.
main:
f=open(/dev/brcmrec) does some work and then
spawns helper:
helper spins forever doing various ioctls, read
and writes on f which was opened in main. Every
time through it looks at a "amIDone" flag which is
set by main. pthreads are the threads.
Then at some point main wants to end helper and
close f. Main sets "amIDone" which tells helper
to terminate and then successfully closes f.
Now here is the problem, our brcmrec driver has a
close() function which isn't getting called when
main does the close, at least not all of the
time.
We're beginning to think that if the helper thread
is in the middle of an ioctl or something then the
close works but it doesn't call the close on the
driver.
I don't even know what kind of help to ask for
here, so feel free to poke at this any ways you
like. I guess the bothersome part is that we have
a thread that doesn an open (did I mention it was
an exclusive open?) and then spawns a thread and
then does a close and we can't reopen the device
and the close part of our driver is never called.
Any ideas or hints?
thanks,
Ian Nelson
next reply other threads:[~2001-07-30 21:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-30 21:09 isnkrnl [this message]
2001-07-30 22:46 ` Bizarre multithread open/close problem Ignacio Vazquez-Abrams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B65CD09.000001.33392@be1.prserv.net \
--to=isnkrnl@attglobal.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox