convert from Glib:: to Glib::Threads for all thread-related API

git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-07-25 17:48:55 +00:00
parent eb6e352dd0
commit 3cd8138a41
138 changed files with 664 additions and 703 deletions

View file

@ -168,7 +168,7 @@ void
ControlList::copy_events (const ControlList& other)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
_events.clear ();
for (const_iterator i = other.begin(); i != other.end(); ++i) {
_events.push_back (new ControlEvent ((*i)->when, (*i)->value));
@ -206,7 +206,7 @@ void
ControlList::clear ()
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
_events.clear ();
unlocked_invalidate_insert_iterator ();
mark_dirty ();
@ -218,14 +218,14 @@ ControlList::clear ()
void
ControlList::x_scale (double factor)
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
_x_scale (factor);
}
bool
ControlList::extend_to (double when)
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
if (_events.empty() || _events.back()->when == when) {
return false;
}
@ -256,7 +256,7 @@ void
ControlList::merge_nascent (double when)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
if (nascent.empty()) {
return;
@ -449,7 +449,7 @@ ControlList::thin ()
bool changed = false;
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
ControlEvent* prevprev = 0;
ControlEvent* cur = 0;
@ -509,7 +509,7 @@ ControlList::thin ()
void
ControlList::fast_simple_add (double when, double value)
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
/* to be used only for loading pre-sorted data from saved state */
_events.insert (_events.end(), new ControlEvent (when, value));
assert(_events.back());
@ -520,7 +520,7 @@ ControlList::fast_simple_add (double when, double value)
void
ControlList::invalidate_insert_iterator ()
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
unlocked_invalidate_insert_iterator ();
}
@ -533,7 +533,7 @@ ControlList::unlocked_invalidate_insert_iterator ()
void
ControlList::start_write_pass (double when)
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
new_write_pass = true;
did_write_during_pass = false;
@ -585,7 +585,7 @@ ControlList::add (double when, double value)
this, value, when, _in_write_pass, (most_recent_insert_iterator == _events.end())));
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
ControlEvent cp (when, 0.0f);
iterator insertion_point;
@ -847,7 +847,7 @@ void
ControlList::erase (iterator i)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
if (most_recent_insert_iterator == i) {
unlocked_invalidate_insert_iterator ();
}
@ -861,7 +861,7 @@ void
ControlList::erase (iterator start, iterator end)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
_events.erase (start, end);
unlocked_invalidate_insert_iterator ();
mark_dirty ();
@ -874,7 +874,7 @@ void
ControlList::erase (double when, double value)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
iterator i = begin ();
while (i != end() && ((*i)->when != when || (*i)->value != value)) {
@ -900,7 +900,7 @@ ControlList::erase_range (double start, double endt)
bool erased = false;
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
erased = erase_range_internal (start, endt, _events);
if (erased) {
@ -939,7 +939,7 @@ void
ControlList::slide (iterator before, double distance)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
if (before == _events.end()) {
return;
@ -960,7 +960,7 @@ void
ControlList::shift (double pos, double frames)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
for (iterator i = _events.begin(); i != _events.end(); ++i) {
if ((*i)->when >= pos) {
@ -983,7 +983,7 @@ ControlList::modify (iterator iter, double when, double val)
*/
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
(*iter)->when = when;
(*iter)->value = val;
@ -1008,7 +1008,7 @@ ControlList::modify (iterator iter, double when, double val)
std::pair<ControlList::iterator,ControlList::iterator>
ControlList::control_points_adjacent (double xval)
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
iterator i;
ControlEvent cp (xval, 0.0f);
std::pair<iterator,iterator> ret;
@ -1054,7 +1054,7 @@ ControlList::thaw ()
}
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
if (_sort_pending) {
_events.sort (event_time_less_than);
@ -1081,7 +1081,7 @@ void
ControlList::truncate_end (double last_coordinate)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
ControlEvent cp (last_coordinate, 0);
ControlList::reverse_iterator i;
double last_val;
@ -1184,7 +1184,7 @@ void
ControlList::truncate_start (double overall_length)
{
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
iterator i;
double first_legal_value;
double first_legal_coordinate;
@ -1439,7 +1439,7 @@ bool
ControlList::rt_safe_earliest_event (double start, double& x, double& y, bool inclusive) const
{
// FIXME: It would be nice if this was unnecessary..
Glib::Mutex::Lock lm(_lock, Glib::TRY_LOCK);
Glib::Threads::Mutex::Lock lm(_lock, Glib::Threads::TRY_LOCK);
if (!lm.locked()) {
return false;
}
@ -1638,7 +1638,7 @@ ControlList::cut_copy_clear (double start, double end, int op)
ControlEvent cp (start, 0.0);
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
/* first, determine s & e, two iterators that define the range of points
affected by this operation
@ -1754,7 +1754,7 @@ ControlList::paste (ControlList& alist, double pos, float /*times*/)
}
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
iterator where;
iterator prev;
double end = 0;
@ -1802,7 +1802,7 @@ ControlList::move_ranges (const list< RangeMove<double> >& movements)
typedef list< RangeMove<double> > RangeMoveList;
{
Glib::Mutex::Lock lm (_lock);
Glib::Threads::Mutex::Lock lm (_lock);
/* a copy of the events list before we started moving stuff around */
EventList old_events = _events;