亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sys_arch.txt

?? NXPl788上lwip的無操作系統移植,基于Embest開發板
?? TXT
字號:
sys_arch interface for lwIP 0.6++

Author: Adam Dunkels

The operating system emulation layer provides a common interface
between the lwIP code and the underlying operating system kernel. The
general idea is that porting lwIP to new architectures requires only
small changes to a few header files and a new sys_arch
implementation. It is also possible to do a sys_arch implementation
that does not rely on any underlying operating system.

The sys_arch provides semaphores and mailboxes to lwIP. For the full
lwIP functionality, multiple threads support can be implemented in the
sys_arch, but this is not required for the basic lwIP
functionality. Previous versions of lwIP required the sys_arch to
implement timer scheduling as well but as of lwIP 0.5 this is
implemented in a higher layer.

In addition to the source file providing the functionality of sys_arch,
the OS emulation layer must provide several header files defining
macros used throughout lwip.  The files required and the macros they
must define are listed below the sys_arch description.

Semaphores can be either counting or binary - lwIP works with both
kinds. Mailboxes are used for message passing and can be implemented
either as a queue which allows multiple messages to be posted to a
mailbox, or as a rendez-vous point where only one message can be
posted at a time. lwIP works with both kinds, but the former type will
be more efficient. A message in a mailbox is just a pointer, nothing
more. 

Semaphores are represented by the type "sys_sem_t" which is typedef'd
in the sys_arch.h file. Mailboxes are equivalently represented by the
type "sys_mbox_t". lwIP does not place any restrictions on how
sys_sem_t or sys_mbox_t are represented internally.

The following functions must be implemented by the sys_arch:

- void sys_init(void)

  Is called to initialize the sys_arch layer.

- sys_sem_t sys_sem_new(u8_t count)

  Creates and returns a new semaphore. The "count" argument specifies
  the initial state of the semaphore.

- void sys_sem_free(sys_sem_t sem)

  Deallocates a semaphore.

- void sys_sem_signal(sys_sem_t sem)

  Signals a semaphore.

- u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout)

  Blocks the thread while waiting for the semaphore to be
  signaled. If the "timeout" argument is non-zero, the thread should
  only be blocked for the specified time (measured in
  milliseconds). If the "timeout" argument is zero, the thread should be
  blocked until the semaphore is signalled.

  If the timeout argument is non-zero, the return value is the number of
  milliseconds spent waiting for the semaphore to be signaled. If the
  semaphore wasn't signaled within the specified time, the return value is
  SYS_ARCH_TIMEOUT. If the thread didn't have to wait for the semaphore
  (i.e., it was already signaled), the function may return zero.

  Notice that lwIP implements a function with a similar name,
  sys_sem_wait(), that uses the sys_arch_sem_wait() function.

- sys_mbox_t sys_mbox_new(int size)

  Creates an empty mailbox for maximum "size" elements. Elements stored
  in mailboxes are pointers. You have to define macros "_MBOX_SIZE"
  in your lwipopts.h, or ignore this parameter in your implementation
  and use a default size.

- void sys_mbox_free(sys_mbox_t mbox)

  Deallocates a mailbox. If there are messages still present in the
  mailbox when the mailbox is deallocated, it is an indication of a
  programming error in lwIP and the developer should be notified.

- void sys_mbox_post(sys_mbox_t mbox, void *msg)

  Posts the "msg" to the mailbox. This function have to block until
  the "msg" is really posted.

- err_t sys_mbox_trypost(sys_mbox_t mbox, void *msg)

  Try to post the "msg" to the mailbox. Returns ERR_MEM if this one
  is full, else, ERR_OK if the "msg" is posted.

- u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)

  Blocks the thread until a message arrives in the mailbox, but does
  not block the thread longer than "timeout" milliseconds (similar to
  the sys_arch_sem_wait() function). If "timeout" is 0, the thread should
  be blocked until a message arrives. The "msg" argument is a result
  parameter that is set by the function (i.e., by doing "*msg =
  ptr"). The "msg" parameter maybe NULL to indicate that the message
  should be dropped.

  The return values are the same as for the sys_arch_sem_wait() function:
  Number of milliseconds spent waiting or SYS_ARCH_TIMEOUT if there was a
  timeout.

  Note that a function with a similar name, sys_mbox_fetch(), is
  implemented by lwIP. 

- u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg)

  This is similar to sys_arch_mbox_fetch, however if a message is not
  present in the mailbox, it immediately returns with the code
  SYS_MBOX_EMPTY. On success 0 is returned.

  To allow for efficient implementations, this can be defined as a
  function-like macro in sys_arch.h instead of a normal function. For
  example, a naive implementation could be:
    #define sys_arch_mbox_tryfetch(mbox,msg) \
      sys_arch_mbox_fetch(mbox,msg,1)
  although this would introduce unnecessary delays.
  
If threads are supported by the underlying operating system and if
such functionality is needed in lwIP, the following function will have
to be implemented as well:

- sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio)

  Starts a new thread named "name" with priority "prio" that will begin its
  execution in the function "thread()". The "arg" argument will be passed as an
  argument to the thread() function. The stack size to used for this thread is
  the "stacksize" parameter. The id of the new thread is returned. Both the id
  and the priority are system dependent.

- sys_prot_t sys_arch_protect(void)

  This optional function does a "fast" critical region protection and returns
  the previous protection level. This function is only called during very short
  critical regions. An embedded system which supports ISR-based drivers might
  want to implement this function by disabling interrupts. Task-based systems
  might want to implement this by using a mutex or disabling tasking. This
  function should support recursive calls from the same task or interrupt. In
  other words, sys_arch_protect() could be called while already protected. In
  that case the return value indicates that it is already protected.

  sys_arch_protect() is only required if your port is supporting an operating
  system.

- void sys_arch_unprotect(sys_prot_t pval)

  This optional function does a "fast" set of critical region protection to the
  value specified by pval. See the documentation for sys_arch_protect() for
  more information. This function is only required if your port is supporting
  an operating system.

Note:

Be carefull with using mem_malloc() in sys_arch. When malloc() refers to
mem_malloc() you can run into a circular function call problem. In mem.c
mem_init() tries to allcate a semaphore using mem_malloc, which of course
can't be performed when sys_arch uses mem_malloc.

-------------------------------------------------------------------------------
Additional files required for the "OS support" emulation layer:
-------------------------------------------------------------------------------

cc.h       - Architecture environment, some compiler specific, some
             environment specific (probably should move env stuff 
             to sys_arch.h.)

  Typedefs for the types used by lwip -
    u8_t, s8_t, u16_t, s16_t, u32_t, s32_t, mem_ptr_t

  Compiler hints for packing lwip's structures -
    PACK_STRUCT_FIELD(x)
    PACK_STRUCT_STRUCT
    PACK_STRUCT_BEGIN
    PACK_STRUCT_END

  Platform specific diagnostic output -
    LWIP_PLATFORM_DIAG(x)    - non-fatal, print a message.
    LWIP_PLATFORM_ASSERT(x)  - fatal, print message and abandon execution.
    Portability defines for printf formatters:
    U16_F, S16_F, X16_F, U32_F, S32_F, X32_F, SZT_F

  "lightweight" synchronization mechanisms -
    SYS_ARCH_DECL_PROTECT(x) - declare a protection state variable.
    SYS_ARCH_PROTECT(x)      - enter protection mode.
    SYS_ARCH_UNPROTECT(x)    - leave protection mode.

  If the compiler does not provide memset() this file must include a
  definition of it, or include a file which defines it.

  This file must either include a system-local <errno.h> which defines
  the standard *nix error codes, or it should #define LWIP_PROVIDE_ERRNO
  to make lwip/arch.h define the codes which are used throughout.


perf.h     - Architecture specific performance measurement.
  Measurement calls made throughout lwip, these can be defined to nothing.
    PERF_START               - start measuring something.
    PERF_STOP(x)             - stop measuring something, and record the result.

sys_arch.h - Tied to sys_arch.c

  Arch dependent types for the following objects:
    sys_sem_t, sys_mbox_t, sys_thread_t,
  And, optionally:
    sys_prot_t

  Defines to set vars of sys_mbox_t and sys_sem_t to NULL.
    SYS_MBOX_NULL NULL
    SYS_SEM_NULL NULL

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩专区欧美专区| 亚洲视频在线一区二区| 色综合一区二区| 成人少妇影院yyyy| 色综合久久综合网欧美综合网| 精品一区二区在线播放| 麻豆精品视频在线观看免费| 久久不见久久见免费视频7 | 久久午夜电影网| 欧美mv和日韩mv国产网站| 日韩你懂的在线播放| 精品国一区二区三区| 国产欧美中文在线| 亚洲视频每日更新| 夜夜精品视频一区二区| 性做久久久久久| 久久97超碰国产精品超碰| 九九视频精品免费| 成人国产精品免费网站| 91久久精品网| 日韩欧美国产一区在线观看| 国产无人区一区二区三区| 综合激情成人伊人| 丝袜美腿高跟呻吟高潮一区| 国产一区二区视频在线播放| 91首页免费视频| 7777精品伊人久久久大香线蕉的| 久久新电视剧免费观看| 亚洲视频图片小说| 奇米四色…亚洲| 成人av高清在线| 91精品婷婷国产综合久久竹菊| 日韩情涩欧美日韩视频| 中文字幕一区二区三区色视频| 亚洲综合区在线| 国产九色精品成人porny | 成人午夜视频网站| 色婷婷综合久久久久中文一区二区| 3atv一区二区三区| 亚洲欧美综合网| 精品一区二区av| 91小视频在线| 国产日韩欧美精品综合| 亚洲第一福利一区| 国产一区二区精品久久| 欧美高清精品3d| 亚洲手机成人高清视频| 国产美女精品一区二区三区| 欧美午夜一区二区三区| 亚洲国产精品成人综合| 麻豆成人久久精品二区三区红| 97se狠狠狠综合亚洲狠狠| 精品91自产拍在线观看一区| 亚洲国产另类av| 99久久99久久精品免费观看 | 国产电影精品久久禁18| 久久精品亚洲国产奇米99| **网站欧美大片在线观看| 国产原创一区二区| 日韩一区二区精品在线观看| 亚洲影院在线观看| 成人手机电影网| 国产人妖乱国产精品人妖| 奇米精品一区二区三区在线观看| 在线免费精品视频| 中文字幕制服丝袜一区二区三区| 国产黑丝在线一区二区三区| 欧美成人精品高清在线播放| 日韩精品电影一区亚洲| 欧美日韩高清一区二区| 一区二区三区不卡在线观看 | 精品污污网站免费看| 亚洲欧美日韩久久| 91啦中文在线观看| 亚洲人xxxx| 91福利社在线观看| 亚洲在线视频网站| 欧美日韩国产电影| 视频一区国产视频| 91精品国产乱码| 免费日本视频一区| 精品国产91亚洲一区二区三区婷婷| 亚洲福利电影网| 欧美日本精品一区二区三区| 日精品一区二区| 精品毛片乱码1区2区3区| 国内精品伊人久久久久av一坑| 精品国产制服丝袜高跟| 国产成人99久久亚洲综合精品| 国产目拍亚洲精品99久久精品| 国产精品亚洲一区二区三区妖精| 欧美经典一区二区| 91丨九色丨蝌蚪丨老版| 亚洲bt欧美bt精品777| 久久精品亚洲一区二区三区浴池| 国产一区二区0| 中文字幕一区视频| 欧美日韩一卡二卡三卡| 麻豆视频观看网址久久| 国产精品丝袜在线| 在线亚洲+欧美+日本专区| 五月天中文字幕一区二区| 精品毛片乱码1区2区3区| 国产成人在线观看免费网站| 亚洲欧美偷拍另类a∨色屁股| 在线视频一区二区三| 狠狠色丁香久久婷婷综合丁香| 国产精品久久毛片| 欧美精品久久久久久久久老牛影院 | 日韩欧美一区二区三区在线| 国产精品1024久久| 一区二区三区加勒比av| 精品久久久久99| 日本精品免费观看高清观看| 狠狠网亚洲精品| 一区二区三区av电影| 2014亚洲片线观看视频免费| 在线观看成人免费视频| 国产成人亚洲精品狼色在线| 天天色天天操综合| 国产精品青草综合久久久久99| 欧美老肥妇做.爰bbww| 成人免费三级在线| 久久超碰97人人做人人爱| 亚洲精品国产一区二区精华液| 久久综合久久久久88| 欧美三区免费完整视频在线观看| 国产精品911| 久久精品国产第一区二区三区| 亚洲精选在线视频| 中文字幕在线不卡国产视频| 精品免费日韩av| 91精品福利在线一区二区三区| 91免费国产在线| 波多野洁衣一区| 国产成人av电影在线| 久久99精品一区二区三区三区| 亚洲v精品v日韩v欧美v专区| 亚洲欧美另类图片小说| 中文字幕在线观看一区| 亚洲国产高清在线| 国产日产欧美一区二区三区| 精品剧情v国产在线观看在线| 8v天堂国产在线一区二区| 欧美中文字幕一二三区视频| 91丝袜呻吟高潮美腿白嫩在线观看| 国产成人av资源| 国产成人精品亚洲777人妖 | 日本一区二区综合亚洲| 欧美成人三级在线| 精品奇米国产一区二区三区| 欧美一区二区精品| 日韩免费在线观看| 精品久久国产老人久久综合| 精品国产一区二区三区四区四| 日韩欧美国产wwwww| 日韩欧美久久一区| 欧美成人r级一区二区三区| 日韩欧美一级二级三级久久久| 日韩欧美亚洲另类制服综合在线| 日韩一二三区视频| 欧美电视剧免费全集观看| 精品少妇一区二区| 欧美激情一区二区在线| 国产精品电影院| 亚洲一区中文在线| 舔着乳尖日韩一区| 美日韩黄色大片| 国产成人精品免费网站| 99久久夜色精品国产网站| 色就色 综合激情| 91精品国产综合久久香蕉的特点 | 日本最新不卡在线| 久久国产麻豆精品| 成人黄色国产精品网站大全在线免费观看 | 国产一区不卡在线| 不卡在线视频中文字幕| 欧美视频自拍偷拍| 日韩一区二区不卡| 国产精品福利一区二区三区| 夜夜揉揉日日人人青青一国产精品 | 中文字幕高清一区| 亚洲激情综合网| 久久成人免费网| 99在线精品免费| 欧美一区二区三区四区视频| 欧美激情一区不卡| 婷婷中文字幕综合| 成人av影院在线| 欧美一区二区免费视频| 国产精品久久精品日日| 婷婷久久综合九色综合绿巨人| 国产成人午夜视频| 3d成人h动漫网站入口| 亚洲欧洲av一区二区三区久久| 免费在线成人网| 色爱区综合激月婷婷| 久久精品男人的天堂| 午夜视频在线观看一区二区| 国产一区二区三区四|