Changeset ea0b339 in rtems


Ignore:
Timestamp:
Mar 7, 2015, 6:23:32 PM (4 years ago)
Author:
Hans Petter Selasky <hselasky@…>
Branches:
master
Children:
0aef6fb
Parents:
ed9a6fd
git-author:
Hans Petter Selasky <hselasky@…> (03/07/15 18:23:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/12/17 05:04:09)
Message:

timecounter: Merge FreeBSD change r279728

Add mutex support to the pps_ioctl() API in the kernel. Bump kernel version to reflect structure change.

PR: 196897
MFC after: 1 week

Update #3175.

Location:
cpukit/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/sys/timepps.h

    red9a6fd rea0b339  
    134134#ifdef _KERNEL
    135135
     136struct mtx;
     137
    136138struct pps_state {
    137139        /* Capture information. */
     
    140142        unsigned        capgen;
    141143        unsigned        capcount;
     144
     145        /* pointer to mutex protecting this state, if any */
     146        struct mtx      *mtx;
    142147
    143148        /* State information. */
  • cpukit/score/src/kern_tc.c

    red9a6fd rea0b339  
    5252#include <sys/lock.h>
    5353#include <sys/mutex.h>
    54 #include <sys/sbuf.h>
    5554#include <sys/sysctl.h>
    5655#include <sys/syslog.h>
     
    17141713                while (aseq == pps->ppsinfo.assert_sequence &&
    17151714                    cseq == pps->ppsinfo.clear_sequence) {
    1716                         if (abi_aware(pps, 1) && pps->driver_mtx != NULL) {
    1717                                 if (pps->flags & PPSFLAG_MTX_SPIN) {
    1718                                         err = msleep_spin(pps, pps->driver_mtx,
    1719                                             "ppsfch", timo);
    1720                                 } else {
    1721                                         err = msleep(pps, pps->driver_mtx, PCATCH,
    1722                                             "ppsfch", timo);
    1723                                 }
    1724                         } else {
     1715                        if (pps->mtx != NULL)
     1716                                err = msleep(pps, pps->mtx, PCATCH, "ppsfch", timo);
     1717                        else
    17251718                                err = tsleep(pps, PCATCH, "ppsfch", timo);
    1726                         }
    17271719                        if (err == EWOULDBLOCK && fapi->timeout.tv_sec == -1) {
    17281720                                continue;
Note: See TracChangeset for help on using the changeset viewer.