tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New manpage: locking(9)



On 18.06.2015 22:33, Christos Zoulas wrote:
> In article <trinity-286f8fb9-ca13-44b1-98d1-8563499c99d4-1434647933661@3capp-mailcom-bs15>,
> Kamil Rytarowski <n54%gmx.com@localhost> wrote:
>> -=-=-=-=-=-
>>
>> I'm attaching a proposition of locking(9).
>>
>> It was inspired by:
>> http://leaf.dragonflybsd.org/cgi/web-man?command=locking&section=ANY
>> https://www.freebsd.org/cgi/man.cgi?query=locking%289%29
>>
>> And by this page:
>> http://www.feyrer.de/NetBSD/bx/blosxom.cgi/nb_20080409_0027.html
>>
>> I included some extra notes about the kernel design and contexts:
>> - thread context vs softirq context vs hardirq context,
>> - process vs kernel thread (LWP),
>> - top kernel half vs bottom kernel half.
>>
>> These details might be off topic, but I need them to understand the
>> overall design and the internal flow.
> 
> That's very nice. I would like to include information on what is the
> typical use for each one and also which ones are obsolete. I also think
> that *tsleep should be included in the docs (at least saying that it has
> been replaced by condvars).
> 

I will do it.

I was told that the mb(9) interface deprecated.... I don't know why? And
indeed, I see it just on a few archs.

$ grep -r 'mb_write()' .
./arch/hppa/include/mutex.h:	mb_write();

$ grep -r 'mb_memory()' .
./arch/alpha/include/mutex.h:#define	MUTEX_GIVE(mtx)			mb_memory()
./arch/hppa/include/mutex.h:	mb_memory();
./arch/m68k/include/mutex.h:#define	MUTEX_GIVE(mtx)			mb_memory()
./arch/mips/include/lock.h:	mb_memory();
./arch/mips/include/lock.h:	mb_memory();
./arch/powerpc/include/mutex.h:#define	MUTEX_GIVE(mtx)			mb_memory()

$ grep -r 'mb_read()' .
./arch/alpha/include/mutex.h:#define	MUTEX_RECEIVE(mtx)		mb_read()
./arch/m68k/include/mutex.h:#define	MUTEX_RECEIVE(mtx)		mb_read()
./arch/mips/include/lock.h:	mb_read();
./arch/mips/include/lock.h:	mb_read();
./arch/powerpc/include/mutex.h:#define	MUTEX_RECEIVE(mtx)		mb_read()
./arch/sparc/include/lock.h:	mb_read();
./arch/sparc64/include/mutex.h:#define	MUTEX_RECEIVE(mtx)		mb_read()
./arch/sparc64/include/rwlock.h:#define	RW_RECEIVE(rw)			mb_read()



Home | Main Index | Thread Index | Old Index