public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Question
@ 1999-06-03  6:46 Keith A. Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Keith A. Jackson @ 1999-06-03  6:46 UTC (permalink / raw)
  To: 'pthreads'

Hi there. I came accross CygWin a while ago while looking for a way to
develop my linux code while trapped on my portable computer with
windowsNT. So far, it has helped immensly, and I give my thanks where it
is due. However, I have a question... I have recently added threading to
my code, and found that the pthreads32 gives undefined reference to
'pthread_create' when linking. It isn't just 'pthread_create', but it
would seem all of the pthreads functions. The code compiles fine, just
won't link, so I'm thinking it's not the headers but the library in some
way. So I researched it a bit, and kept reading something about ming or
something or other. I am in no way an expert programmer, and I'm
probably asking something that's well known to all but me... Does
pthreads32 work in CygWin? If so... how do I make it work? I've tried
downloading the pthreads3 source and compiling that with gcc as well,
but with no success, seeing:

condvar.c: In function `int cond_timedwait(struct pthread_cond_t_ **,
struct pth
read_mutex_t_ **, const struct timespec *)':
condvar.c:538: parse error before `)'
condvar.c:538: parse error before `*'
condvar.c:545: request for member `execute' in `cleanup(...)', which is
of non-a
ggregate type `PThreadCleanup ()(...)'
make: *** [condvar.o] Error 1

If anyone could point out what I'm doing wrong, or just tell me that
it's not gunna be possible at this point to develop threaded
applications this way, I'd be grateful.

Rather than being replied asking for specifics about what I'm running:

     586 40MB RAM
     Cygwin B20
     egcs-2.91.57 ?
     WindowsNT

Thank you very much in advance....

+===============================+
#   Keith A. Jackson            #  (CBP)
+-------------------------------+
#   dshadow@cambridgeoaks.com   #
#   keithj@agvp.com             #
+===============================+

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Question...
@ 1999-06-30 10:18 Keith A. Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Keith A. Jackson @ 1999-06-30 10:18 UTC (permalink / raw)
  To: 'pthreads'

I have a question, and I don't know if this is exactly the place to ask
it, as it's more about general pthreads, and not about the Win32
implementation, but here goes...

I am currently working on some multi-user software. Each connection to
the server will have it's own thread that handles socket i/o (tcp/ip
based). So in the end, I end up with x amount of threads, that spend
most all cpu time in select() waiting for activity, since it's
command-based, and people only type so fast... Testing this out, it's
all worked fine, until I attempted opening many connecitions... (50+).
The result is that it kills the system response time. Not just the
server itself, but the whole computer. Am I just plain going about it
the wrong way? Is thread switching to slow to handle this? Even when
they are usually doing nothing but waiting for i/o? If anyone can give
me some insight to speeds and so forth of threading, or maybe point me
to a better place to ask this, I'd be grateful. For this experience, it
was done under RedHat Linux using the pthreads library.

P.S. Yes, it would be more "effecient" to have one process waiting for
i/o, then upon that, spawn off another thread to handle it, but for the
purposes of this software, it appeared to be more logical and powerful
to do it this way.

Thanks ahead of time,
  Keith Jackson

+===============================+
#   Keith A. Jackson            #  (CBP)
+-------------------------------+
#   dshadow@cambridgeoaks.com   #
#   keithj@agvp.com             #
+===============================+

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-30 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-03  6:46 Question Keith A. Jackson
1999-06-30 10:18 Question Keith A. Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).