1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0"" |
4 // under the terms of "Eclipse Public License v1.0"" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
24 // TDmaChannel |
24 // TDmaChannel |
25 // |
25 // |
26 |
26 |
27 inline void TDmaChannel::Wait() |
27 inline void TDmaChannel::Wait() |
28 { |
28 { |
29 NKern::ThreadEnterCS(); |
29 __KTRACE_OPT(KDMA, Kern::Printf("TDmaChannel::Wait thread %O channel - %d", |
30 Kern::MutexWait(*iMutex); |
30 &Kern::CurrentThread(), iPslId)); |
|
31 NKern::FMWait(&iLock); |
|
32 __KTRACE_OPT(KDMA, Kern::Printf("TDmaChannel::Wait thread %O channel - %d Acq", |
|
33 &Kern::CurrentThread(), iPslId)); |
31 } |
34 } |
32 |
35 |
33 inline void TDmaChannel::Signal() |
36 inline void TDmaChannel::Signal() |
34 { |
37 { |
35 Kern::MutexSignal(*iMutex); |
38 __KTRACE_OPT(KDMA, Kern::Printf("TDmaChannel::Signal thread %O channel - %d", |
36 NKern::ThreadLeaveCS(); |
39 &Kern::CurrentThread(), iPslId)); |
|
40 NKern::FMSignal(&iLock); |
37 } |
41 } |
38 |
42 |
39 inline void TDmaChannel::Flash() |
43 inline TBool TDmaChannel::Flash() |
40 { |
44 { |
41 Kern::MutexSignal(*iMutex); |
45 __KTRACE_OPT(KDMA, Kern::Printf("TDmaChannel::Flash thread %O channel - %d", |
42 Kern::MutexWait(*iMutex); |
46 &Kern::CurrentThread(), iPslId)); |
|
47 const TBool r = NKern::FMFlash(&iLock); |
|
48 __KTRACE_OPT(KDMA, Kern::Printf("TDmaChannel::Flash thread %O channel - %d Acq (%d)", |
|
49 &Kern::CurrentThread(), iPslId, r)); |
|
50 return r; |
43 } |
51 } |
44 |
52 |
45 inline TBool TDmaChannel::IsOpened() const |
53 inline TBool TDmaChannel::IsOpened() const |
46 { |
54 { |
47 __KTRACE_OPT(KDMA, Kern::Printf("Warning: TDmaChannel::IsOpened() is deprecated")); |
55 __KTRACE_OPT(KDMA, Kern::Printf("Warning: TDmaChannel::IsOpened() is deprecated")); |