~mir-team/mir/trunk

« back to all changes in this revision

Viewing changes to src/client/mir_basic_rpc_channel.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2013-04-25 23:50:01 UTC
  • mfrom: (526.2.22 mir1)
  • Revision ID: tarmac-20130425235001-c3b3x2yyb3eldyx1
frontend, shell, tests: surface-states updated to avoid supplying dependencies through public member functions.

Approved by PS Jenkins bot, Chris Halse Rogers, Robert Ancell, Kevin DuBois.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
 
101
101
int mcl::MirBasicRpcChannel::next_id()
102
102
{
103
 
    int id = next_message_id.load();
104
 
    while (!next_message_id.compare_exchange_weak(id, id + 1)) std::this_thread::yield();
105
 
    return id;
 
103
    return next_message_id.fetch_add(1);
106
104
}