OpenMP is widely used for shared memory parallel programming and is especially useful for the parallelisation of loops. When it comes to task parallelism, however, OpenMP is less powerful and the sections construct lacks support for dependences and fine grained tasks. This paper proposes a new work-sharing construct, tasks, which is a generalisation of sections. It goes beyond sections by allowing unbalanced and finer grained tasks with arbitrary dependence structure. A proof-of-concept compiler has been implemented for the new directives, which includes a state-of-the-art scheduling algorithm for task graphs. Experiments with a large set of programs were conducted using the new directives. The results demonstrate that the new approach can efficiently exploit the task parallelism inherent in the code, without introducing any additional overhead.