/* FUNCTIONS ****************************************************************/
+/*
+ * @implemented
+ */
+VOID STDCALL
+RtlAcquirePebLock(VOID)
+{
+ PPEB Peb = NtCurrentPeb ();
+ Peb->FastPebLockRoutine (Peb->FastPebLock);
+}
+
+
+/*
+ * @implemented
+ */
+VOID STDCALL
+RtlReleasePebLock(VOID)
+{
+ PPEB Peb = NtCurrentPeb ();
+ Peb->FastPebUnlockRoutine (Peb->FastPebLock);
+}
+
static inline VOID
RtlpCopyParameterString(PWCHAR *Ptr,
PUNICODE_STRING Destination,
);
}
+PPEB
+STDCALL
+RtlpCurrentPeb(VOID)
+{
+ return NtCurrentPeb();
+}
+
static NTSTATUS
RtlpMapFile(PUNICODE_STRING ImageFileName,
PRTL_USER_PROCESS_PARAMETERS Ppb,
#define NDEBUG
#include <ntdll/ntdll.h>
+PPEB STDCALL RtlpCurrentPeb(VOID);
/* FUNCTIONS *****************************************************************/
-/* FIXME: Added here temporarly until I fix this properly tomorrow */
-/*
- * @implemented
- */
-VOID STDCALL
-RtlAcquirePebLock(VOID)
-{
- PPEB Peb = NtCurrentPeb ();
- Peb->FastPebLockRoutine (Peb->FastPebLock);
-}
-
-/* FIXME: Added here temporarly until I fix this properly tomorrow */
-/*
- * @implemented
- */
-VOID STDCALL
-RtlReleasePebLock(VOID)
-{
- PPEB Peb = NtCurrentPeb ();
- Peb->FastPebUnlockRoutine (Peb->FastPebLock);
-}
-
/*
* @implemented
*/
if (Environment == NULL)
{
- if (NtCurrentPeb() == NULL)
- {
- return(STATUS_VARIABLE_NOT_FOUND);
+ PPEB Peb = RtlpCurrentPeb();
+ if (Peb) {
+ Environment = Peb->ProcessParameters->Environment;
+ SysEnvUsed = TRUE;
}
- Environment = NtCurrentPeb()->ProcessParameters->Environment;
- SysEnvUsed = TRUE;
}
if (Environment == NULL)
/* INCLUDES ******************************************************************/
#include <ntoskrnl.h>
+#include <internal/ps.h>
#define NDEBUG
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
+/*
+ * @implemented
+ */
+VOID STDCALL
+RtlAcquirePebLock(VOID)
+{
+
+}
+
+/*
+ * @implemented
+ */
+VOID STDCALL
+RtlReleasePebLock(VOID)
+{
+
+}
+
+PPEB
+STDCALL
+RtlpCurrentPeb(VOID)
+{
+ return ((PEPROCESS)(KeGetCurrentThread()->ApcState.Process))->Peb;
+}
+
NTSTATUS
STDCALL
RtlDeleteCriticalSection(