mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed compiler warnings
svn path=/trunk/; revision=973
This commit is contained in:
parent
7c3e6e80c1
commit
19e258120e
2 changed files with 14 additions and 13 deletions
|
@ -21,12 +21,11 @@ VOID STDCALL ApcRoutine(PVOID Context,
|
||||||
PIO_STATUS_BLOCK IoStatus,
|
PIO_STATUS_BLOCK IoStatus,
|
||||||
ULONG Reserved)
|
ULONG Reserved)
|
||||||
{
|
{
|
||||||
printf("(apc.exe) ApcRoutine(Context %x)\n", Context);
|
printf("(apc.exe) ApcRoutine(Context %p)\n", Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE FileHandle;
|
HANDLE FileHandle;
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
@ -48,7 +47,7 @@ void main(int argc, char* argv[])
|
||||||
if (EventHandle == INVALID_HANDLE_VALUE)
|
if (EventHandle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
printf("Failed to create event\n");
|
printf("Failed to create event\n");
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Opening file\n");
|
printf("Opening file\n");
|
||||||
|
@ -71,13 +70,13 @@ void main(int argc, char* argv[])
|
||||||
if (FileHandle == INVALID_HANDLE_VALUE)
|
if (FileHandle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
printf("Open failed\n");
|
printf("Open failed\n");
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
printf("Reading file\n");
|
printf("Reading file\n");
|
||||||
Status = ZwReadFile(FileHandle,
|
Status = ZwReadFile(FileHandle,
|
||||||
NULL,
|
NULL,
|
||||||
ApcRoutine,
|
(PIO_APC_ROUTINE)ApcRoutine,
|
||||||
0xdeadbeef,
|
(PVOID)0xdeadbeef,
|
||||||
&IoStatus,
|
&IoStatus,
|
||||||
Buffer,
|
Buffer,
|
||||||
256,
|
256,
|
||||||
|
@ -93,5 +92,6 @@ void main(int argc, char* argv[])
|
||||||
ZwClose(FileHandle);
|
ZwClose(FileHandle);
|
||||||
printf("Program finished\n");
|
printf("Program finished\n");
|
||||||
for(;;);
|
for(;;);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: thread.c,v 1.5 2000/01/30 20:55:51 hochoa Exp $
|
/* $Id: thread.c,v 1.6 2000/01/31 20:24:27 ekohl Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define NR_THREADS (10)
|
#define NR_THREADS (10)
|
||||||
|
|
||||||
|
@ -16,17 +17,17 @@ DWORD WINAPI thread_main1(LPVOID param)
|
||||||
{
|
{
|
||||||
ULONG s;
|
ULONG s;
|
||||||
|
|
||||||
printf("Thread %d running\n", (DWORD)param);
|
printf("Thread %ld running\n", (DWORD)param);
|
||||||
s = nr = ((nr * 1103515245) + 12345) & 0x7fffffff;
|
s = nr = ((nr * 1103515245) + 12345) & 0x7fffffff;
|
||||||
s = s % 10;
|
s = s % 10;
|
||||||
printf("s %d\n", s);
|
printf("s %ld\n", s);
|
||||||
Sleep(s);
|
Sleep(s);
|
||||||
printf("Thread %d finished\n", (DWORD)param);
|
printf("Thread %ld finished\n", (DWORD)param);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shows the help on how to use these program to the user
|
// Shows the help on how to use these program to the user
|
||||||
void showHelp()
|
void showHelp(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("\nReactOS threads test program (built on %s).\n\n", __DATE__);
|
printf("\nReactOS threads test program (built on %s).\n\n", __DATE__);
|
||||||
|
@ -53,7 +54,7 @@ int main (int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
nr = atoi(argv[1]);
|
nr = atoi(argv[1]);
|
||||||
printf("Seed %d\n", nr);
|
printf("Seed %ld\n", nr);
|
||||||
|
|
||||||
printf("Creating %d threads...\n",NR_THREADS*2);
|
printf("Creating %d threads...\n",NR_THREADS*2);
|
||||||
for (i=0;i<NR_THREADS;i++)
|
for (i=0;i<NR_THREADS;i++)
|
||||||
|
|
Loading…
Reference in a new issue