source: rtems/cpukit/shttpd/compat_rtems.h @ 484cd8d

4.104.114.84.95
Last change on this file since 484cd8d was 484cd8d, checked in by Ralf Corsepius <ralf.corsepius@…>, on 06/11/07 at 13:24:29

Import from shttpd-1.37.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @file rtems/rtems-shttpd.h
3 */
4
5#ifndef _rtems_rtems_webserver_h
6#define _rtems_rtems_webserver_h
7
8#include "shttpd.h"
9
10#include <rtems.h>
11#include <sys/socket.h>
12#include <netinet/in.h>
13#include <dirent.h>
14
15/* RTEMS is an Real Time Embedded operating system, for operation in hardware.
16  It does not have SSL or CGI support, as it does not have dynamic library
17  loading or sub-processes. */
18#define EMBEDDED
19#define NO_SSL
20#define NO_CGI
21
22#define DIRSEP                          '/'
23#define O_BINARY                        0
24#define ERRNO                           errno
25
26/* RTEMS version is Thread Safe */
27#define InitializeCriticalSection(x)  rtems_semaphore_create( \
28                                  rtems_build_name('H','T','P','X'), \
29                                  1, /* Not Held Yet.*/ \
30                                  RTEMS_FIFO | \
31                                  RTEMS_BINARY_SEMAPHORE, \
32                                  0, \
33                                  x);
34#define EnterCriticalSection(x) rtems_semaphore_obtain(*(x),RTEMS_WAIT,RTEMS_NO_TIMEOUT)
35#define LeaveCriticalSection(x) rtems_semaphore_release(*(x))
36
37
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43typedef void (*rtems_shttpd_addpages)(struct shttpd_ctx *ctx);
44typedef void (*rtems_shttpd_init)(void);
45
46rtems_status_code rtems_initialize_webserver(rtems_task_priority   initial_priority,
47                                             rtems_unsigned32      stack_size,
48                                             rtems_mode            initial_modes,
49                                             rtems_attribute       attribute_set,
50                                             rtems_shttpd_init     init_callback,
51                                             rtems_shttpd_addpages addpages_callback,
52                                             char                 *webroot
53                                            );
54void rtems_terminate_webserver(void);
55int  rtems_webserver_ok(void);
56
57#ifdef __cplusplus
58}
59#endif
60#endif
Note: See TracBrowser for help on using the repository browser.