# FreeRTOS Learning

**URL:** <https://forums.freertos.org/t/freertos-learning/6452>\
**Category:** Kernel\
**Created:** [February 28, 2017, 6:50am UTC](https://forums.freertos.org/t/freertos-learning/6452 "2017-02-28T06:50:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 28, 2017, 6:50am UTC](https://forums.freertos.org/t/freertos-learning/6452/1 "2017-02-28T06:50:32Z")

</div>

**[eaoiyrioeaf](https://sourceforge.net/u/eaoiyrioeaf/)** wrote on [Tuesday, February 28, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bbc006e5/#6508):

I’m learning FreeRTOS currently, I will try to write down what I learned from the source code and share it in this forum. hope it can help the beginner, and if I have made some mistake, it will be highly appreciated if some one can point out.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 28, 2017, 7:01am UTC](https://forums.freertos.org/t/freertos-learning/6452/2 "2017-02-28T07:01:39Z")

</div>

**[eaoiyrioeaf](https://sourceforge.net/u/eaoiyrioeaf/)** wrote on [Tuesday, February 28, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bbc006e5/#5fdf):

Don’t know how to insert picture, attached picture is how I understood the List of FreeRTOS.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 28, 2017, 7:45am UTC](https://forums.freertos.org/t/freertos-learning/6452/3 "2017-02-28T07:45:37Z")

</div>

**[eaoiyrioeaf](https://sourceforge.net/u/eaoiyrioeaf/)** wrote on [Tuesday, February 28, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bbc006e5/#afc4):

Another picture to explain the function:  
void vListInsert( List\_t \* const pxList, ListItem\_t \* const pxNewListItem )

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 28, 2017, 8:21am UTC](https://forums.freertos.org/t/freertos-learning/6452/4 "2017-02-28T08:21:32Z")

</div>

**[eaoiyrioeaf](https://sourceforge.net/u/eaoiyrioeaf/)** wrote on [Tuesday, February 28, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bbc006e5/#23f9):

Picture to explain the function:  
UBaseType\_t uxListRemove( ListItem\_t \* const pxItemToRemove )

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [February 28, 2017, 8:56am UTC](https://forums.freertos.org/t/freertos-learning/6452/5 "2017-02-28T08:56:58Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Tuesday, February 28, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bbc006e5/#bb14):

Hi John, thanks for the clear pictures. That all looks correct to me.

As you can see, the `List_t` type has been implemented with a minimum RAM footprint. All items (elements) know to which list they belong, if any. Each node in the list is part its object.

For instance, an example taken from FreeRTOS+TCP: a network buffer is either linked into a free list or into a list of occupied buffers. In order to make it linkable, it gets a `ListItem_t` field:

```auto
typedef struct xNETWORK_BUFFER
{
    ListItem_t xBufferListItem; /* Used to reference the buffer form the free buffer list or a socket. */
    uint32_t ulIPAddress; /* Source or destination IP address, depending on usage scenario. */
    uint8_t *pucEthernetBuffer; /* Pointer to the start of the Ethernet frame. */
    ...
} NetworkBufferDescriptor_t;

```

Now `xBufferListItem` will always point to one of the two lists. You can add more `ListItem_t`'s to your objects to make them linkable to several lists.

The `List_t` type has been exposed in a header file, but normally developers will not make use of them. It is a type definition “internal to the kernel”. But you’re free to use it, of course. Note that with a few additions (wrappers), you can create both FIFO’s and stacks, based on `List_t`.

Other objects are more important for most developers: Queue’s, Semaphores, Event-Groups and the mechanisms to notify (and wake-up) a task.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 28, 2017, 10:12am UTC](https://forums.freertos.org/t/freertos-learning/6452/6 "2017-02-28T10:12:50Z")

</div>

**[eaoiyrioeaf](https://sourceforge.net/u/eaoiyrioeaf/)** wrote on [Tuesday, February 28, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/bbc006e5/#bb14/72d6):

Hello Hein, your explanation help me a lot to move forward, Thank you very much Sir!
