---
title: lockEnqueue
framework: kernel
role: pseudoSymbol
path: kernel/iopacketqueue/1810734-lockenqueue
---

# lockEnqueue

Adds a chain of packets to the tail of a synchronized queue.

## Declaration

```occ
virtual bool lockEnqueue(
 mbuf_tm); 
```

## Parameters

- `m`: A chain of packets to add to the tail of the queue.

## Return Value

Return Value Returns true on success, or false to indicate over-capacity and refusal to accept the packet chain provided.

## Overview

Overview Packets are not added if the size of the queue has reached its capacity. A spinlock is used to synchronize access to the queue.

## See Also

### Miscellaneous

- [dequeue](kernel/iopacketqueue/1810464-dequeue.md)
- [dequeueAll](kernel/iopacketqueue/1810493-dequeueall.md)
- [enqueue(IOPacketQueue *)](kernel/iopacketqueue/1810512-enqueue.md)
- [enqueue(mbuf_t)](kernel/iopacketqueue/1810538-enqueue.md)
- [enqueueWithDrop](kernel/iopacketqueue/1810567-enqueuewithdrop.md)
- [flush](kernel/iopacketqueue/1810584-flush.md)
- [free](kernel/iopacketqueue/1810608-free.md)
- [getCapacity](kernel/iopacketqueue/1810646-getcapacity.md)
- [getSize](kernel/iopacketqueue/1810665-getsize.md)
- [initWithCapacity](kernel/iopacketqueue/1810679-initwithcapacity.md)
- [lockDequeue](kernel/iopacketqueue/1810698-lockdequeue.md)
- [lockDequeueAll](kernel/iopacketqueue/1810717-lockdequeueall.md)
- [lockEnqueueWithDrop](kernel/iopacketqueue/1810758-lockenqueuewithdrop.md)
- [lockFlush](kernel/iopacketqueue/1810785-lockflush.md)
- [lockPrepend](kernel/iopacketqueue/1810813-lockprepend.md)
- [peek](kernel/iopacketqueue/1810837-peek.md)
- [prepend(IOPacketQueue *)](kernel/iopacketqueue/1810853-prepend.md)
- [prepend(mbuf_t)](kernel/iopacketqueue/1810881-prepend.md)
- [setCapacity](kernel/iopacketqueue/1810899-setcapacity.md)
- [withCapacity](kernel/iopacketqueue/1810920-withcapacity.md)
