EmbeddedRelated.com

Niall Cooling (@NiallCooling)

Niall Cooling is a Chartered Engineer and Founder of Feabhas, the UK’s leading independent provider of training and consultancy for real-time embedded systems development and software competency. Niall delivers training and provides consultancy and mentoring to a wide variety of electronics companies ranging from smart metering, industrial control, telecommunications and defence. He is also a regular guest speaker at industry conferences and events throughout the world and has particular interest in establishing a competency framework for Embedded Software Engineering.

Working with Strings in Embedded C++

Niall Cooling June 1, 20233 comments

This article discusses the use of strings in embedded systems. It explains how the need for and use of strings in embedded systems has changed with the advent of cheaper, full graphic displays and the growth of the ‘Internet of Things’ (IoT). The article also covers character literals, C-Strings and string literals, and the difference in memory models between them. It also highlights the safety and security issues that arise from using strings in embedded systems. Finally, it explains how C++11 introduced a Raw string literal type that is useful for storing file paths or regular expressions.


Mutex vs. Semaphores – Part 2: The Mutex & Mutual Exclusion Problems

Niall Cooling May 15, 20197 comments

Part 1 of this series we looked at the history of the binary and counting semaphore, and then went on to discuss some of the associated problem areas. In this posting I aim to show how a different RTOS construct, the mutex, may overcome some, if not all, of these weaknesses.

To address the problems associated with semaphore, a new concept was developed during the late 1980’s. I have struggled to find it’s first clear definition, but the major use of the term mutex (another...


Mutex vs. Semaphore - Part 1

Niall Cooling April 12, 20195 comments

It never ceases to amaze me how often I see postings in forums asking the difference between a semaphore and a mutex. Probably what baffles me more is that over 90% of the time the responses given are either incorrect or missing the key differences. The most often quoted response is that of the “The Toilet Example (c) Copyright 2005, Niclas Winquist” . This summarises the differences as:

  • A mutex is really a semaphore with value 1

No, no, and no again....


No Threads Found

Use this form to contact NiallCooling

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address