flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 20 Jul 2010, 11:33
Normally if a thread owns a lock then subsequent calls to lock again succeed and a usage counter is incremented. And the reverse when unlocking.
|
|||
![]() |
|
Tyler 20 Jul 2010, 11:59
How do I tell the difference between a different thread/process calling and a nested call from another page allocating function? I'm assuming I'm going about this the right way. Is there some special way this is supposed to be done? It's my physical mem manager so it has to be system wide, not thread/process specific.
Is it impossible to do this without fully implementing multitasking, with mutexes, spinlocks, etc.? Maybe I should have asked over at OSdev. If anyone sees a cross posting, I'm sorry. |
|||
![]() |
|
revolution 20 Jul 2010, 12:14
Tyler wrote: How do I tell the difference between a different thread/process calling and a nested call from another page allocating function? |
|||
![]() |
|
Tyler 20 Jul 2010, 12:35
I'm far away from getting anywhere near implementing threads and processes, so I think I may have answered my own question, and you confirmed my answer: "it [is] impossible to do this without [mostly] implementing multitasking"
|
|||
![]() |
|
revolution 20 Jul 2010, 12:38
If you are not already multi-tasking/multi-threading then you have no need for a lock. Locks are only needed when you have more than one running task.
|
|||
![]() |
|
Tyler 20 Jul 2010, 12:57
I was writing with the future in mind. It just happens that there's no interface for code I haven't written yet.
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.