lkml.org 
[lkml]   [1997]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Suggestion for Linux 2.3
Date
	There's a decent article on Threads in the Feb `97 Linux Journal
which showed up yesterday..

You might want to get that, I think they have their articles
and code segments online at http://www.ssc.com/

- Jared

Ingo Molnar graced my mailbox with this long sought knowledge:
>
> On Tue, 7 Jan 1997, William Burrow wrote:
>
> > In different note, someone pointed out to me that in some cases an
> > application is required to know when a disk write occurs. Would it be
> > possible to have some mechanism in the buffer/cache system to send a
> > signal to an app when buffers have bee flushed that requested this signal?
>
> you can do this with threads, in user-space, using LinuxThreads:
>
> ------------------------------------------------------>
> pthread_cond_init(cond1);
> pthread_create(newthread,do_controlled_async_writeout);
>
> <do stuff>
>
> pthread_cond_wait(cond1);
>
> ...
>
> do_controlled_async_writeout()
> {
> do_a_blocking_write();
> pthread_cond_signal(cond1);
> pthread_exit(this);
> }
> <------------------------------------------------------
>
> or whatever synronization method you want, this conditional variable is
> just one example.
>
> this solution is fast, cheap and robust.
>
> -- mingo
>


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.030 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site