]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/httpd/v2_0/tests/httpd1.c
Initial revision
[karo-tx-redboot.git] / packages / net / httpd / v2_0 / tests / httpd1.c
1 //==========================================================================
2 //
3 //      ./net/http/current/tests/httpd1.c
4 //
5 //
6 //==========================================================================
7 //####ECOSGPLCOPYRIGHTBEGIN####
8 // -------------------------------------------
9 // This file is part of eCos, the Embedded Configurable Operating System.
10 // Copyright (C) 2003 Andrew Lunn
11 //
12 // eCos is free software; you can redistribute it and/or modify it under
13 // the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 2 or (at your option) any later version.
15 //
16 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19 // for more details.
20 //
21 // You should have received a copy of the GNU General Public License along
22 // with eCos; if not, write to the Free Software Foundation, Inc.,
23 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
24 //
25 // As a special exception, if other files instantiate templates or use macros
26 // or inline functions from this file, or you compile this file and link it
27 // with other works to produce a work based on this file, this file does not
28 // by itself cause the resulting work to be covered by the GNU General Public
29 // License. However the source code for this file must still be made available
30 // in accordance with section (3) of the GNU General Public License.
31 //
32 // This exception does not invalidate any other reasons why a work based on
33 // this file might be covered by the GNU General Public License.
34 //
35 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
36 // at http://sources.redhat.com/ecos/ecos-license/
37 // -------------------------------------------
38 //####ECOSGPLCOPYRIGHTEND####
39 //==========================================================================
40 //#####DESCRIPTIONBEGIN####
41 //
42 // Author(s):    andrew.lunn@ascom.ch
43 // Contributors: andrew.lunn@ascom.ch
44 // Date:         2003-04-29
45 // Purpose:      
46 // Description:  
47 //              
48 //
49 //####DESCRIPTIONEND####
50 //
51 //==========================================================================
52
53 #include <network.h>
54 #include <cyg/infra/testcase.h>
55
56 #define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_TYPICAL + 0x1000)
57 static char stack[STACK_SIZE];
58 static cyg_thread thread_data;
59 static cyg_handle_t thread_handle;
60
61 void
62 httpd_test(cyg_addrword_t p)
63 {
64   
65   CYG_TEST_INIT();
66
67   init_all_network_interfaces();
68
69   cyg_thread_delay(1 * 60 * 100);
70
71   CYG_TEST_PASS_FINISH( "httpd test finished" );
72 }
73
74 void
75 cyg_start(void)
76 {
77     // Create a main thread, so we can run the scheduler and have time 'pass'
78     cyg_thread_create(10,                // Priority - just a number
79                       httpd_test,          // entry
80                       0,                 // entry parameter
81                       "httpd test",    // Name
82                       &stack[0],         // Stack
83                       STACK_SIZE,        // Size
84                       &thread_handle,    // Handle
85                       &thread_data       // Thread data structure
86             );
87     cyg_thread_resume(thread_handle);  // Start it
88     cyg_scheduler_start();
89 }